-
Notifications
You must be signed in to change notification settings - Fork 806
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
Fixed all issues related to RTL direction of Spectre #505
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,14 @@ | |
&::after { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
transform: translate(50%, -50%); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
@if $rtl == true { | ||
left: 0; | ||
transform: translate(-50%, -50%); | ||
} @else { | ||
right: 0; | ||
transform: translate(50%, -50%); | ||
} | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,13 +25,27 @@ | |
width: 0; | ||
|
||
&:first-child { | ||
border-bottom-left-radius: $border-radius; | ||
border-top-left-radius: $border-radius; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
@if $rtl == true { | ||
border-bottom-right-radius: $border-radius; | ||
border-top-right-radius: $border-radius; | ||
} @else { | ||
border-bottom-left-radius: $border-radius; | ||
border-top-left-radius: $border-radius; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
} | ||
&:last-child { | ||
border-bottom-right-radius: $border-radius; | ||
border-top-right-radius: $border-radius; | ||
flex-shrink: 1; | ||
|
||
@if $rtl == true { | ||
border-bottom-left-radius: $border-radius; | ||
border-top-left-radius: $border-radius; | ||
} @else { | ||
border-bottom-right-radius: $border-radius; | ||
border-top-right-radius: $border-radius; | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,13 +136,19 @@ | |
color: currentColor; | ||
height: $unit-4; | ||
line-height: $unit-4; | ||
margin-left: $unit-1; | ||
margin-right: -2px; | ||
opacity: 1; | ||
padding: 0; | ||
text-decoration: none; | ||
width: $unit-4; | ||
|
||
@if $rtl == true { | ||
margin-right: $unit-1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Properties should be ordered margin-left, margin-right |
||
margin-left: -2px; | ||
} @else { | ||
margin-left: $unit-1; | ||
margin-right: -2px; | ||
} | ||
|
||
&:hover { | ||
opacity: .95; | ||
} | ||
|
@@ -161,17 +167,37 @@ | |
.btn { | ||
flex: 1 0 auto; | ||
&:first-child:not(:last-child) { | ||
border-bottom-right-radius: 0; | ||
border-top-right-radius: 0; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
@if $rtl == true { | ||
border-bottom-left-radius: 0; | ||
border-top-left-radius: 0; | ||
} @else { | ||
border-bottom-right-radius: 0; | ||
border-top-right-radius: 0; | ||
} | ||
|
||
} | ||
&:not(:first-child):not(:last-child) { | ||
border-radius: 0; | ||
margin-left: -$border-width; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
@if $rtl == true { | ||
margin-right: -$border-width; | ||
} @else { | ||
margin-left: -$border-width; | ||
} | ||
} | ||
&:last-child:not(:first-child) { | ||
border-bottom-left-radius: 0; | ||
border-top-left-radius: 0; | ||
margin-left: -$border-width; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
@if $rtl == true { | ||
border-bottom-right-radius: 0; | ||
border-top-right-radius: 0; | ||
margin-right: -$border-width; | ||
} @else { | ||
border-bottom-left-radius: 0; | ||
border-top-left-radius: 0; | ||
margin-left: -$border-width; | ||
} | ||
|
||
} | ||
&:focus, | ||
&:hover, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,13 +131,21 @@ | |
transform: translateY(-50%); | ||
} | ||
&.range-start { | ||
&::before { | ||
left: 50%; | ||
&::before { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
@if $rtl == true { | ||
right: 50%; | ||
} @else { | ||
left: 50%; | ||
} | ||
} | ||
} | ||
&.range-end { | ||
&::before { | ||
right: 50%; | ||
@if $rtl == true { | ||
left: 50%; | ||
} @else { | ||
right: 50%; | ||
} | ||
} | ||
} | ||
|
||
|
@@ -189,14 +197,24 @@ | |
top: 19px; | ||
} | ||
&.range-start { | ||
&::before { | ||
left: auto; | ||
&::before { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
width: 19px; | ||
|
||
@if $rtl == true { | ||
right: auto; | ||
} @else { | ||
left: auto; | ||
} | ||
|
||
} | ||
} | ||
&.range-end { | ||
&::before { | ||
right: 19px; | ||
&::before { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
@if $rtl == true { | ||
left: 19px; | ||
} @else { | ||
right: 19px; | ||
} | ||
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,13 @@ | |
} | ||
|
||
.avatar { | ||
margin-left: -$unit-2; | ||
margin-right: $unit-1; | ||
@if $rtl == true { | ||
margin-right: -$unit-2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Properties should be ordered margin-left, margin-right |
||
margin-left: $unit-1; | ||
} @else { | ||
margin-left: -$unit-2; | ||
margin-right: $unit-1; | ||
} | ||
} | ||
|
||
.btn-clear { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,14 +122,21 @@ textarea.form-input { | |
&[size], | ||
&[multiple] { | ||
height: auto; | ||
|
||
option { | ||
padding: $unit-h $unit-1; | ||
} | ||
} | ||
&:not([multiple]):not([size]) { | ||
background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='%23667189'%20d='M2%200L0%202h4zm0%205L0%203h4z'/%3E%3C/svg%3E") no-repeat right .35rem center/.4rem .5rem; | ||
padding-right: $control-icon-size + $control-padding-x; | ||
|
||
@if $rtl == true { | ||
background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='%23667189'%20d='M2%200L0%202h4zm0%205L0%203h4z'/%3E%3C/svg%3E") no-repeat left .35rem center/.4rem .5rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Color literals like |
||
padding-left: $control-icon-size + $control-padding-x; | ||
} @else { | ||
background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='%23667189'%20d='M2%200L0%202h4zm0%205L0%203h4z'/%3E%3C/svg%3E") no-repeat right .35rem center/.4rem .5rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Color literals like |
||
padding-right: $control-icon-size + $control-padding-x; | ||
} | ||
|
||
} | ||
&:focus { | ||
@include control-shadow(); | ||
|
@@ -197,9 +204,14 @@ textarea.form-input { | |
line-height: $line-height; | ||
margin: ($control-size - $control-size-sm) / 2 0; | ||
min-height: 1.2rem; | ||
padding: (($control-size-sm - $line-height) / 2) $control-padding-x (($control-size-sm - $line-height) / 2) ($control-icon-size + $control-padding-x); | ||
position: relative; | ||
|
||
@if $rtl == true { | ||
padding: (($control-size-sm - $line-height) / 2) ($control-icon-size + $control-padding-x) (($control-size-sm - $line-height) / 2) $control-padding-x; | ||
} @else { | ||
padding: (($control-size-sm - $line-height) / 2) $control-padding-x (($control-size-sm - $line-height) / 2) ($control-icon-size + $control-padding-x); | ||
} | ||
|
||
input { | ||
clip: rect(0, 0, 0, 0); | ||
height: 1px; | ||
|
@@ -242,9 +254,14 @@ textarea.form-input { | |
.form-icon { | ||
background: $bg-color-light; | ||
height: $control-icon-size; | ||
left: 0; | ||
top: ($control-size-sm - $control-icon-size) / 2; | ||
width: $control-icon-size; | ||
|
||
@if $rtl == true { | ||
right: 0; | ||
} @else { | ||
left: 0; | ||
} | ||
} | ||
|
||
input { | ||
|
@@ -317,14 +334,17 @@ textarea.form-input { | |
|
||
// Form element: Switch | ||
.form-switch { | ||
padding-left: ($unit-8 + $control-padding-x); | ||
@if $rtl == true { | ||
padding-right: ($unit-8 + $control-padding-x); | ||
} @else { | ||
padding-left: ($unit-8 + $control-padding-x); | ||
} | ||
|
||
.form-icon { | ||
background: $gray-color-light; | ||
background-clip: padding-box; | ||
border-radius: $unit-2 + $border-width; | ||
height: $unit-4 + $border-width * 2; | ||
left: 0; | ||
top: ($control-size-sm - $unit-4) / 2 - $border-width; | ||
width: $unit-8; | ||
&::before { | ||
|
@@ -339,6 +359,13 @@ textarea.form-input { | |
top: 0; | ||
width: $unit-4; | ||
} | ||
|
||
@if $rtl == true { | ||
right: 0; | ||
} @else { | ||
left: 0; | ||
} | ||
|
||
} | ||
|
||
input { | ||
|
@@ -393,17 +420,38 @@ textarea.form-input { | |
.input-group-addon, | ||
.input-group-btn { | ||
&:first-child:not(:last-child) { | ||
border-bottom-right-radius: 0; | ||
border-top-right-radius: 0; | ||
|
||
@if $rtl == true { | ||
border-bottom-left-radius: 0; | ||
border-top-left-radius: 0; | ||
} @else { | ||
border-bottom-right-radius: 0; | ||
border-top-right-radius: 0; | ||
} | ||
|
||
} | ||
&:not(:first-child):not(:last-child) { | ||
border-radius: 0; | ||
margin-left: -$border-width; | ||
|
||
@if $rtl == true { | ||
margin-right: -$border-width; | ||
} @else { | ||
margin-left: -$border-width; | ||
} | ||
|
||
} | ||
&:last-child:not(:first-child) { | ||
border-bottom-left-radius: 0; | ||
border-top-left-radius: 0; | ||
margin-left: -$border-width; | ||
|
||
@if $rtl == true { | ||
border-bottom-right-radius: 0; | ||
border-top-right-radius: 0; | ||
margin-right: -$border-width; | ||
} @else { | ||
border-bottom-left-radius: 0; | ||
border-top-left-radius: 0; | ||
margin-left: -$border-width; | ||
} | ||
|
||
} | ||
&:focus { | ||
z-index: $zindex-0 + 1; | ||
|
@@ -447,7 +495,7 @@ textarea.form-input { | |
.form-icon { | ||
border-color: $error-color; | ||
} | ||
|
||
input { | ||
&:checked + .form-icon { | ||
background: $error-color; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Selector should have depth of applicability no greater than 2, but was 3
Line contains trailing whitespace