Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f3c9bca
support empty string in breakpoint() mixin
shawnbot Jul 18, 2018
92a2cef
add $responsive-variants map
shawnbot Jul 18, 2018
b632983
add docs for $responsive-variants
shawnbot Jul 18, 2018
182cd2e
use $responsive-variants for .float-*
shawnbot Jul 18, 2018
94748cf
use $responsive-variants and list for .d-*
shawnbot Jul 18, 2018
f3b8e57
use $responsive-variants for .direction-*
shawnbot Jul 18, 2018
957e55c
use $responsive-variants in .border-*, .rounded-*;
shawnbot Jul 18, 2018
2a8647f
add .rounded-<edge> utility docs
shawnbot Jul 18, 2018
cff39b5
line up border-color util parens
shawnbot Jul 18, 2018
6bf88ce
use $responsive-variants for margin utils
shawnbot Jul 18, 2018
c73a52b
use $responsive-variants for padding utils
shawnbot Jul 18, 2018
ac762d2
fix #472
shawnbot Jul 18, 2018
55cde57
remove variable interpolations in padding utils
shawnbot Jul 18, 2018
3bdccf9
add caution bits for $responsive-variants
shawnbot Jul 18, 2018
034e76a
nix unnecessary interpolations in comments
shawnbot Jul 18, 2018
05c8d29
use $responsive-variants for flex utils
shawnbot Jul 18, 2018
4b6cdb0
use $responsive-variants for .text-*
shawnbot Jul 18, 2018
7341f7f
normalize whitespace
shawnbot Jul 18, 2018
4124a31
update package-lock.json
shawnbot Jul 20, 2018
6d5983f
Merge remote-tracking branch 'origin/master' into responsive-variants
shawnbot Aug 23, 2018
314eeb4
move responsive border docs from marketing to core
shawnbot Aug 23, 2018
eea1415
[breaking] remove responsive borders from marketing-utilities
shawnbot Aug 23, 2018
92fd60c
move responsive borders from marketing into primer-utilities
shawnbot Aug 23, 2018
2ebc81a
Merge branch 'release-10.9.0' into responsive-variants
shawnbot Oct 15, 2018
96d1e4f
make mx-auto responsive a la #577
shawnbot Oct 16, 2018
9c312fb
Merge remote-tracking branch 'origin/release-10.9.0' into responsive-…
shawnbot Oct 17, 2018
4c975aa
Update modules/primer-layout/lib/grid-offset.scss
Oct 17, 2018
957fa8b
rebuild package-lock
shawnbot Oct 17, 2018
11fe822
Merge pull request #582 from primer/offset-is-important-v2
shawnbot Oct 17, 2018
3173ad7
Merge remote-tracking branch 'origin/release-10.9.0' into responsive-…
shawnbot Oct 18, 2018
6e98ed2
move links to the bottom
shawnbot Oct 18, 2018
52f468c
update package-lock
shawnbot Oct 18, 2018
4cfa9b8
Merge branch 'release-10.9.0' into responsive-variants
shawnbot Oct 18, 2018
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
Next Next commit
support empty string in breakpoint() mixin
  • Loading branch information
shawnbot committed Jul 18, 2018
commit f3c9bca296f8f953ed8374d4d47fb4cd78d23296
30 changes: 18 additions & 12 deletions modules/primer-support/lib/mixins/layout.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
// Responsive media queries

@mixin breakpoint($breakpoint) {
// Retrieves the value from the key
$value: map-get($breakpoints, $breakpoint);

// If the key exists in the map
@if $value != null {
// Prints a media query based on the value
@media (min-width: $value) {
@content;
}
@if $breakpoint == "" {
@content;
}

// If the key doesn't exist in the map
@else {
@warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. "
+ "Please make sure it is defined in `$breakpoints` map.";
// Retrieves the value from the key
$value: map-get($breakpoints, $breakpoint);

// If the key exists in the map
@if $value != null {
// Prints a media query based on the value
@media (min-width: $value) {
@content;
}
}

// If the key doesn't exist in the map
@else {
@warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. "
+ "Please make sure it is defined in `$breakpoints` map.";
}
}
}

Expand Down