Skip to content

Commit bc146a5

Browse files
author
Stanislav Idolov
authored
ENGCOM-1805: [Resolved : Styling <select> by changing less variables in Luma theme… #15734
2 parents ab48069 + 3bbc3a0 commit bc146a5

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

app/design/frontend/Magento/luma/web/css/source/_forms.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,7 @@
9191
.select-styling() {
9292
.lib-css(appearance, none, 1);
9393
appearance: none;
94-
background: @select__background url('../images/select-bg.svg') no-repeat 100% 45%;
9594
background-size: 30px 60px;
96-
border: 1px solid @border-color__base;
97-
height: 32px;
98-
padding-right: 25px;
9995
text-indent: .01em;
10096
text-overflow: '';
10197

app/design/frontend/Magento/luma/web/css/source/_theme.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@
166166
// Forms
167167
// ---------------------------------------------
168168

169+
170+
// Select
171+
@select__background: @form-element-input__background url('../images/select-bg.svg') no-repeat 100% 45%;
172+
@select__border: 1px solid @border-color__base;
173+
@select__height: 32px;
174+
@select__padding: 4px 25px @indent__xs @indent__s;
175+
169176
// Form fieldset
170177
@form-fieldset-legend__font-size: 18px;
171178
@form-fieldset-legend__font-weight: @font-weight__light;

dev/tests/static/framework/Magento/Sniffs/Less/PropertiesSortingSniff.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ public function process(File $phpcsFile, $stackPtr)
100100
*/
101101
private function validatePropertiesSorting(File $phpcsFile, $stackPtr, array $properties)
102102
{
103+
// Fix needed for cases when incorrect properties passed for validation due to bug in PHP tokens.
104+
$symbolsForSkip = ['(', 'block'];
105+
$properties = array_filter(
106+
$properties,
107+
function ($var) use ($symbolsForSkip) {
108+
return !in_array($var, $symbolsForSkip);
109+
}
110+
);
103111

104112
$originalProperties = $properties;
105113
sort($properties);

lib/web/css/source/lib/variables/_forms.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
@select__disabled__font-style: @form-element-input__disabled__font-style;
122122

123123
// Focus state
124-
@select__focus__background: @form-element-input__focus__background;
124+
@select__focus__background: false;
125125
@select__focus__border: @form-element-input__focus__border;
126126
@select__focus__color: @form-element-input__focus__color;
127127
@select__focus__font-style: @form-element-input__focus__font-style;

0 commit comments

Comments
 (0)