Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
95f37e4c
Commit
95f37e4c
authored
8 years ago
by
Starsam80
Committed by
Mark Otto
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Clean up spacers a bit more
parent
9a93671b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/utilities/spacing.md
+6
-6
docs/utilities/spacing.md
scss/_variables.scss
+6
-24
scss/_variables.scss
scss/utilities/_spacing.scss
+10
-12
scss/utilities/_spacing.scss
with
22 additions
and
42 deletions
+22
-42
docs/utilities/spacing.md
+
6
-
6
View file @
95f37e4c
...
@@ -35,11 +35,11 @@ Where *sides* is one of:
...
@@ -35,11 +35,11 @@ Where *sides* is one of:
Where
*size*
is one of:
Where
*size*
is one of:
*
`0`
- for classes that eliminate the
`margin`
or
`padding`
by setting it to
`0`
*
`0`
- for classes that eliminate the
`margin`
or
`padding`
by setting it to
`0`
*
`1`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer * .25`
or
`$spacer * .25`
*
`1`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer * .25`
*
`2`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer * .5`
or
`$spacer * .5`
*
`2`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer * .5`
*
`3`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer`
or
`$spacer`
*
`3`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer`
*
`4`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer * 1.5`
or
`$spacer * 1.5`
*
`4`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer * 1.5`
*
`5`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer * 3`
or
`$spacer * 3`
*
`5`
- (by default) for classes that set the
`margin`
or
`padding`
to
`$spacer * 3`
(You can add more sizes by adding entries to the
`$spacers`
Sass map variable.)
(You can add more sizes by adding entries to the
`$spacers`
Sass map variable.)
...
@@ -62,7 +62,7 @@ Here are some representative examples of these classes:
...
@@ -62,7 +62,7 @@ Here are some representative examples of these classes:
}
}
.p-3 {
.p-3 {
padding: $spacer
$spacer
!important;
padding: $spacer !important;
}
}
{% endhighlight %}
{% endhighlight %}
...
...
This diff is collapsed.
Click to expand it.
scss/_variables.scss
+
6
-
24
View file @
95f37e4c
...
@@ -140,30 +140,12 @@ $enable-print-styles: true !default;
...
@@ -140,30 +140,12 @@ $enable-print-styles: true !default;
$spacer
:
1rem
!
default
;
$spacer
:
1rem
!
default
;
$spacers
:
(
$spacers
:
(
0
:
(
0
:
0
,
x
:
0
,
1
:
(
$spacer
*
.25
)
,
y
:
0
2
:
(
$spacer
*
.5
)
,
)
,
3
:
$spacer
,
1
:
(
4
:
(
$spacer
*
1
.5
)
,
x
:
(
$spacer
*
.25
)
,
5
:
(
$spacer
*
3
)
y
:
(
$spacer
*
.25
)
)
,
2
:
(
x
:
(
$spacer
*
.5
)
,
y
:
(
$spacer
*
.5
)
)
,
3
:
(
x
:
$spacer
,
y
:
$spacer
)
,
4
:
(
x
:
(
$spacer
*
1
.5
)
,
y
:
(
$spacer
*
1
.5
)
)
,
5
:
(
x
:
(
$spacer
*
3
)
,
y
:
(
$spacer
*
3
)
)
)
!
default
;
)
!
default
;
// This variable affects the `.h-*` and `.w-*` classes.
// This variable affects the `.h-*` and `.w-*` classes.
...
...
This diff is collapsed.
Click to expand it.
scss/utilities/_spacing.scss
+
10
-
12
View file @
95f37e4c
...
@@ -5,22 +5,20 @@
...
@@ -5,22 +5,20 @@
$infix
:
breakpoint-infix
(
$breakpoint
,
$grid-breakpoints
);
$infix
:
breakpoint-infix
(
$breakpoint
,
$grid-breakpoints
);
@each
$prop
,
$abbrev
in
(
margin
:
m
,
padding
:
p
)
{
@each
$prop
,
$abbrev
in
(
margin
:
m
,
padding
:
p
)
{
@each
$size
,
$lengths
in
$spacers
{
@each
$size
,
$length
in
$spacers
{
$length-x
:
map-get
(
$lengths
,
x
);
$length-y
:
map-get
(
$lengths
,
y
);
.
#{
$abbrev
}#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
:
$
length
-y
$
length-x
!
important
;
}
.
#{
$abbrev
}#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
:
$
length
!
important
;
}
.
#{
$abbrev
}
t
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-top
:
$
length
-y
!
important
;
}
.
#{
$abbrev
}
t
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-top
:
$
length
!
important
;
}
.
#{
$abbrev
}
r
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-right
:
$
length
-x
!
important
;
}
.
#{
$abbrev
}
r
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-right
:
$
length
!
important
;
}
.
#{
$abbrev
}
b
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-bottom
:
$
length
-y
!
important
;
}
.
#{
$abbrev
}
b
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-bottom
:
$
length
!
important
;
}
.
#{
$abbrev
}
l
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-left
:
$
length
-x
!
important
;
}
.
#{
$abbrev
}
l
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-left
:
$
length
!
important
;
}
.
#{
$abbrev
}
x
#{
$infix
}
-
#{
$size
}
{
.
#{
$abbrev
}
x
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-right
:
$
length
-x
!
important
;
#{
$prop
}
-right
:
$
length
!
important
;
#{
$prop
}
-left
:
$
length
-x
!
important
;
#{
$prop
}
-left
:
$
length
!
important
;
}
}
.
#{
$abbrev
}
y
#{
$infix
}
-
#{
$size
}
{
.
#{
$abbrev
}
y
#{
$infix
}
-
#{
$size
}
{
#{
$prop
}
-top
:
$
length
-y
!
important
;
#{
$prop
}
-top
:
$
length
!
important
;
#{
$prop
}
-bottom
:
$
length
-y
!
important
;
#{
$prop
}
-bottom
:
$
length
!
important
;
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets