Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate sizing classes #508

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions _lib/solid-utilities/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@
// -------------------------
@import "layout/_display.scss";

// Margin
// Spacing
// -------------------------
@import "layout/_margin.scss";

// Padding
// -------------------------
@import "layout/_padding.scss";
@import "layout/_spacing.scss";

// Positioning
// -------------------------
Expand Down
71 changes: 0 additions & 71 deletions _lib/solid-utilities/layout/_margin.scss

This file was deleted.

69 changes: 0 additions & 69 deletions _lib/solid-utilities/layout/_padding.scss

This file was deleted.

20 changes: 20 additions & 0 deletions _lib/solid-utilities/layout/_spacing.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

// Spacing
// -------------------------

@include generate-breakpoint-prefixes {
$sizes: ("0": 0, "05": $space-05, "1": $space-1, "2": $space-2, "3": $space-3, "4": $space-4, "5": $space-5, "6": $space-6);
$properties: ("m": "margin", "p": "padding");

@each $propPrefix, $property in $properties {
@each $name, $size in $sizes {
&#{$propPrefix}#{$name} { #{$property}: $size !important; } // m0
&#{$propPrefix}t#{$name}, &#{$propPrefix}y#{$name} { #{$property}-top: $size !important; } // mt0, my0
&#{$propPrefix}r#{$name}, &#{$propPrefix}x#{$name} { #{$property}-right: $size !important; } // mr0, mx0
&#{$propPrefix}b#{$name}, &#{$propPrefix}y#{$name} { #{$property}-bottom: $size !important; } // mb0, my0
&#{$propPrefix}l#{$name}, &#{$propPrefix}x#{$name} { #{$property}-left: $size !important; } // ml0, mx0
}
}

&mx-auto { margin-left: auto !important; margin-right: auto !important; }
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bf-solid",
"version": "2.11.2",
"version": "2.12.0",
"description": "Solid CSS Styling",
"scripts": {
"prepublish": "grunt dist"
Expand Down
14 changes: 14 additions & 0 deletions release-notes/2019-10-28-2.12.0.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
category: release-notes
version: 2.12.0
title: Consolidate spacing properties

breaking-changes:

potential-breaking-changes:
- removal of _padding.scss and _margin.scss files

release-notes:
- created _spacing.scss and consolidated padding and margin utility classes
- combined x and y spacing classes with left, right and top, bottom for smaller final file size
---