Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/stylesheets/components/_icon-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ $icon-list-breakpoints: map-merge($this-null, $system-breakpoints);
}
// Or the standard prefix if the breakpoint is output
@else if map-get($theme-utility-breakpoints, $mq-key) {
$prefix: "#{$mq-key}\\:";
$prefix: "#{$mq-key}#{$separator}";
}

@include at-media($mq-key) {
Expand Down
8 changes: 8 additions & 0 deletions src/stylesheets/core/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ Namespace
$ns-utility: ns("utility");
$ns-grid: ns("grid");

/*
----------------------------------------
Separator
----------------------------------------
*/

$separator: $theme-prefix-separator;

/*
----------------------------------------
Spacing
Expand Down
4 changes: 2 additions & 2 deletions src/stylesheets/core/mixins/_utility-builder.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ loop
$important: if($utilities-use-important, " !important", null);
$this-mq: null;

.#{$media-prefix}#{$pseudoclass}\:#{ns("utility")}#{$selector}:#{$pseudoclass} {
.#{$media-prefix}#{$pseudoclass}#{$separator}#{ns("utility")}#{$selector}:#{$pseudoclass} {
@each $this-property in $property {
#{$this-property}: unquote("#{$value}#{$important}");
}
Expand Down Expand Up @@ -63,7 +63,7 @@ future version of Sass' warning.
$value-is-map: if(type-of($val-props) == "map", true, false);

@if $media-key {
$media-prefix: #{$media-key}\:;
$media-prefix: #{$media-key}#{$separator};
}

.#{$media-prefix}#{ns("utility")}#{$selector} {
Expand Down
18 changes: 9 additions & 9 deletions src/stylesheets/elements/_layout-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ $namespace-grid: ns("grid");
@each $mq-key, $mq-value in $system-breakpoints {
@if map-get($theme-utility-breakpoints, $mq-key) {
@include at-media($mq-key) {
.#{$mq-key}\:#{$namespace-grid}container {
.#{$mq-key}#{$separator}#{$namespace-grid}container {
$props: append-important($grid-global, desktop);
@include grid-container($props);
}

// ...with custom widths
@each $width-key, $width-value in $system-breakpoints {
.#{$mq-key}\:#{$namespace-grid}container-#{$width-key} {
.#{$mq-key}#{$separator}#{$namespace-grid}container-#{$width-key} {
$props: append-important($grid-global, $width-key);
@include grid-container($props);
}
Expand Down Expand Up @@ -58,7 +58,7 @@ $namespace-grid: ns("grid");
@each $gap-key,
$gap-val in map-deep-get($system-properties, gap, standard)
{
&.#{$mq-key}\:#{$namespace-grid}gap-#{$gap-key} {
&.#{$mq-key}#{$separator}#{$namespace-grid}gap-#{$gap-key} {
$props: append-important($grid-global, $gap-key);
@include grid-gap($props);
}
Expand Down Expand Up @@ -102,21 +102,21 @@ $namespace-grid: ns("grid");
@each $mq-key, $mq-value in $system-breakpoints {
@if map-get($theme-utility-breakpoints, $mq-key) {
@include at-media($mq-key) {
.#{$mq-key}\:#{$namespace-grid}col {
.#{$mq-key}#{$separator}#{$namespace-grid}col {
$props: append-important($grid-global, fill);
@include grid-col($props);
}
.#{$mq-key}\:#{$namespace-grid}col-fill {
.#{$mq-key}#{$separator}#{$namespace-grid}col-fill {
$props: append-important($grid-global, fill);
@include grid-col($props);
}
.#{$mq-key}\:#{$namespace-grid}col-auto {
.#{$mq-key}#{$separator}#{$namespace-grid}col-auto {
$props: append-important($grid-global, auto);
@include grid-col($props);
}

@each $width-key, $width-value in $system-layout-grid-widths {
.#{$mq-key}\:#{$namespace-grid}col-#{$width-key} {
.#{$mq-key}#{$separator}#{$namespace-grid}col-#{$width-key} {
$props: append-important($grid-global, $width-key);
@include grid-col($props);
}
Expand All @@ -142,14 +142,14 @@ $namespace-grid: ns("grid");
@if map-get($theme-utility-breakpoints, $mq-key) {
@each $width-key, $width-value in $system-layout-grid-widths {
@include at-media($mq-key) {
.#{$mq-key}\:#{$namespace-grid}offset-#{$width-key} {
.#{$mq-key}#{$separator}#{$namespace-grid}offset-#{$width-key} {
$props: append-important($grid-global, $width-key);
@include grid-offset($props);
}
}
}
@include at-media($mq-key) {
.#{$mq-key}\:#{$namespace-grid}offset-none {
.#{$mq-key}#{$separator}#{$namespace-grid}offset-none {
$props: append-important($grid-global, none);
@include grid-offset($props);
}
Expand Down
16 changes: 16 additions & 0 deletions src/stylesheets/settings/_settings-general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ $theme-namespace: (
),
) !default;

/*
----------------------------------------
Prefix separator
----------------------------------------
Set the character the separates
responsive and state prefixes from the
main class name.

The default (":") needs to be preceded
by two backslashes to be properly
escaped.
----------------------------------------
*/

$theme-prefix-separator: "\\:" !default;

/*
----------------------------------------
Layout grid
Expand Down
20 changes: 18 additions & 2 deletions src/stylesheets/theme/_uswds-theme-general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ https://designsystem.digital.gov/design-tokens

/*
----------------------------------------
Image Path
Image path
----------------------------------------
Relative image file path
----------------------------------------
Expand Down Expand Up @@ -58,6 +58,22 @@ $theme-namespace: (
),
);

/*
----------------------------------------
Prefix separator
----------------------------------------
Set the character the separates
responsive and state prefixes from the
main class name.

The default (":") needs to be preceded
by two backslashes to be properly
escaped.
----------------------------------------
*/

$theme-prefix-separator: "\\:";

/*
----------------------------------------
Layout grid
Expand All @@ -67,7 +83,7 @@ with !important
----------------------------------------
*/

$theme-layout-grid-use-important: false !default;
$theme-layout-grid-use-important: false;

/*
----------------------------------------
Expand Down