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

Horizontal direction specific class names set in variables #39161

Open
wants to merge 3 commits into
base: main
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
32 changes: 16 additions & 16 deletions scss/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ $utilities: map-merge(
responsive: true,
property: float,
values: (
start: left,
end: right,
$start: left,
$end: right,
none: none,
)
),
Expand Down Expand Up @@ -107,12 +107,12 @@ $utilities: map-merge(
),
"start": (
property: left,
class: start,
class: $start,
values: $position-values
),
"end": (
property: right,
class: end,
class: $end,
values: $position-values
),
"translate-middle": (
Expand Down Expand Up @@ -142,7 +142,7 @@ $utilities: map-merge(
),
"border-end": (
property: border-right,
class: border-end,
class: 'border-#{$end}',
values: (
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0,
Expand All @@ -157,7 +157,7 @@ $utilities: map-merge(
),
"border-start": (
property: border-left,
class: border-start,
class: 'border-#{$start}',
values: (
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0,
Expand Down Expand Up @@ -376,7 +376,7 @@ $utilities: map-merge(
"margin-end": (
responsive: true,
property: margin-right,
class: me,
class: 'm#{$e}',
values: map-merge($spacers, (auto: auto))
),
"margin-bottom": (
Expand All @@ -388,7 +388,7 @@ $utilities: map-merge(
"margin-start": (
responsive: true,
property: margin-left,
class: ms,
class: 'm#{$s}',
values: map-merge($spacers, (auto: auto))
),
// Negative margin utilities
Expand Down Expand Up @@ -419,7 +419,7 @@ $utilities: map-merge(
"negative-margin-end": (
responsive: true,
property: margin-right,
class: me,
class: 'm#{$e}',
values: $negative-spacers
),
"negative-margin-bottom": (
Expand All @@ -431,7 +431,7 @@ $utilities: map-merge(
"negative-margin-start": (
responsive: true,
property: margin-left,
class: ms,
class: 'm#{$s}',
values: $negative-spacers
),
// Padding utilities
Expand Down Expand Up @@ -462,7 +462,7 @@ $utilities: map-merge(
"padding-end": (
responsive: true,
property: padding-right,
class: pe,
class: 'p#{$e}',
values: $spacers
),
"padding-bottom": (
Expand All @@ -474,7 +474,7 @@ $utilities: map-merge(
"padding-start": (
responsive: true,
property: padding-left,
class: ps,
class: 'p#{$s}',
values: $spacers
),
// Gap utility
Expand Down Expand Up @@ -543,8 +543,8 @@ $utilities: map-merge(
property: text-align,
class: text,
values: (
start: left,
end: right,
$start: left,
$end: right,
center: center,
)
),
Expand Down Expand Up @@ -740,7 +740,7 @@ $utilities: map-merge(
),
"rounded-end": (
property: border-top-right-radius border-bottom-right-radius,
class: rounded-end,
class: 'rounded-#{$end}',
values: (
null: var(--#{$prefix}border-radius),
0: 0,
Expand Down Expand Up @@ -770,7 +770,7 @@ $utilities: map-merge(
),
"rounded-start": (
property: border-bottom-left-radius border-top-left-radius,
class: rounded-start,
class: 'rounded-#{$start}',
values: (
null: var(--#{$prefix}border-radius),
0: 0,
Expand Down
6 changes: 6 additions & 0 deletions scss/_variables.scss
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the small version of start/end should just be $s and $e?

Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ $enable-important-utilities: true !default;
$enable-dark-mode: true !default;
$color-mode-type: data !default; // `data` or `media-query`

// Horizontal direction specific class names
$start: start !default;
$s: s !default;
$end: end !default;
$e: e !default;

// Prefix for :root CSS variables

$variable-prefix: bs- !default; // Deprecated in v5.2.0 for the shorter `$prefix`
Expand Down
Loading