mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 09:05:47 +02:00
feat(RTL): implement RTL
Using RTLCSS directives, renaming things to use logical names and following best practices.
This commit is contained in:
@@ -12,7 +12,11 @@ $utilities: map-merge(
|
||||
"float": (
|
||||
responsive: true,
|
||||
property: float,
|
||||
values: left right none
|
||||
values: (
|
||||
start: left,
|
||||
end: right,
|
||||
none: none,
|
||||
)
|
||||
),
|
||||
"overflow": (
|
||||
property: overflow,
|
||||
@@ -47,12 +51,14 @@ $utilities: map-merge(
|
||||
property: bottom,
|
||||
values: $position-values
|
||||
),
|
||||
"left": (
|
||||
"start": (
|
||||
property: left,
|
||||
class: start,
|
||||
values: $position-values
|
||||
),
|
||||
"right": (
|
||||
"end": (
|
||||
property: right,
|
||||
class: end,
|
||||
values: $position-values
|
||||
),
|
||||
"translate-middle": (
|
||||
@@ -76,8 +82,9 @@ $utilities: map-merge(
|
||||
0: 0,
|
||||
)
|
||||
),
|
||||
"border-right": (
|
||||
"border-end": (
|
||||
property: border-right,
|
||||
class: border-end,
|
||||
values: (
|
||||
null: $border-width solid $border-color,
|
||||
0: 0,
|
||||
@@ -90,8 +97,9 @@ $utilities: map-merge(
|
||||
0: 0,
|
||||
)
|
||||
),
|
||||
"border-left": (
|
||||
"border-start": (
|
||||
property: border-left,
|
||||
class: border-start,
|
||||
values: (
|
||||
null: $border-width solid $border-color,
|
||||
0: 0,
|
||||
@@ -288,10 +296,10 @@ $utilities: map-merge(
|
||||
class: mt,
|
||||
values: map-merge($spacers, (auto: auto))
|
||||
),
|
||||
"margin-right": (
|
||||
"margin-end": (
|
||||
responsive: true,
|
||||
property: margin-right,
|
||||
class: mr,
|
||||
class: me,
|
||||
values: map-merge($spacers, (auto: auto))
|
||||
),
|
||||
"margin-bottom": (
|
||||
@@ -300,10 +308,10 @@ $utilities: map-merge(
|
||||
class: mb,
|
||||
values: map-merge($spacers, (auto: auto))
|
||||
),
|
||||
"margin-left": (
|
||||
"margin-start": (
|
||||
responsive: true,
|
||||
property: margin-left,
|
||||
class: ml,
|
||||
class: ms,
|
||||
values: map-merge($spacers, (auto: auto))
|
||||
),
|
||||
// Negative margin utilities
|
||||
@@ -331,10 +339,10 @@ $utilities: map-merge(
|
||||
class: mt,
|
||||
values: $negative-spacers
|
||||
),
|
||||
"negative-margin-right": (
|
||||
"negative-margin-end": (
|
||||
responsive: true,
|
||||
property: margin-right,
|
||||
class: mr,
|
||||
class: me,
|
||||
values: $negative-spacers
|
||||
),
|
||||
"negative-margin-bottom": (
|
||||
@@ -343,10 +351,10 @@ $utilities: map-merge(
|
||||
class: mb,
|
||||
values: $negative-spacers
|
||||
),
|
||||
"negative-margin-left": (
|
||||
"negative-margin-start": (
|
||||
responsive: true,
|
||||
property: margin-left,
|
||||
class: ml,
|
||||
class: ms,
|
||||
values: $negative-spacers
|
||||
),
|
||||
// Padding utilities
|
||||
@@ -374,10 +382,10 @@ $utilities: map-merge(
|
||||
class: pt,
|
||||
values: $spacers
|
||||
),
|
||||
"padding-right": (
|
||||
"padding-end": (
|
||||
responsive: true,
|
||||
property: padding-right,
|
||||
class: pr,
|
||||
class: pe,
|
||||
values: $spacers
|
||||
),
|
||||
"padding-bottom": (
|
||||
@@ -386,10 +394,10 @@ $utilities: map-merge(
|
||||
class: pb,
|
||||
values: $spacers
|
||||
),
|
||||
"padding-left": (
|
||||
"padding-start": (
|
||||
responsive: true,
|
||||
property: padding-left,
|
||||
class: pl,
|
||||
class: ps,
|
||||
values: $spacers
|
||||
),
|
||||
// Text
|
||||
@@ -424,7 +432,11 @@ $utilities: map-merge(
|
||||
responsive: true,
|
||||
property: text-align,
|
||||
class: text,
|
||||
values: left right center
|
||||
values: (
|
||||
start: left,
|
||||
end: right,
|
||||
center: center,
|
||||
)
|
||||
),
|
||||
"color": (
|
||||
property: color,
|
||||
@@ -483,7 +495,8 @@ $utilities: map-merge(
|
||||
"word-wrap": (
|
||||
property: word-wrap word-break,
|
||||
class: text,
|
||||
values: (break: break-word)
|
||||
values: (break: break-word),
|
||||
rtl: false
|
||||
),
|
||||
"font-family": (
|
||||
property: font-family,
|
||||
@@ -517,9 +530,9 @@ $utilities: map-merge(
|
||||
class: rounded-top,
|
||||
values: (null: $border-radius)
|
||||
),
|
||||
"rounded-right": (
|
||||
"rounded-end": (
|
||||
property: border-top-right-radius border-bottom-right-radius,
|
||||
class: rounded-right,
|
||||
class: rounded-end,
|
||||
values: (null: $border-radius)
|
||||
),
|
||||
"rounded-bottom": (
|
||||
@@ -527,9 +540,9 @@ $utilities: map-merge(
|
||||
class: rounded-bottom,
|
||||
values: (null: $border-radius)
|
||||
),
|
||||
"rounded-left": (
|
||||
"rounded-start": (
|
||||
property: border-bottom-left-radius border-top-left-radius,
|
||||
class: rounded-left,
|
||||
class: rounded-start,
|
||||
values: (null: $border-radius)
|
||||
),
|
||||
"visibility": (
|
||||
|
Reference in New Issue
Block a user