Skip to content

Clean code less vendor prefix appearance #31191

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

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@
overflow-y: auto;
padding-top: .25em;
&::-webkit-scrollbar {
-webkit-appearance: none;
.lib-vendor-prefix-appearance(none);
width: 7px;
}

&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, .5);
border-radius: 4px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@
.field-gift_wrapping_price {
&:not(.field-weight) {
.addon {
.lib-vendor-prefix-display(inline-flex);
.lib-vendor-prefix-flex-direction(row);
color: #303030;
display: inline-flex;
flex-flow: row nowrap;
Expand Down Expand Up @@ -142,10 +140,10 @@
}

.admin__control-text {
.lib-css(appearance, none, 1);
.lib-vendor-prefix-flex-basis(auto);
.lib-vendor-prefix-flex-grow(1);
.lib-vendor-prefix-flex-shrink(1);
.lib-vendor-prefix-appearance(none);
flex-basis: auto;
flex-grow: 1;
flex-shrink: 1;
background: none;
border: 0;
}
Expand All @@ -159,10 +157,10 @@
}

.addafter {
.lib-vendor-prefix-flex-basis(auto);
.lib-vendor-prefix-flex-grow(0);
.lib-vendor-prefix-flex-shrink(0);
.lib-vendor-prefix-order(0);
flex-basis: auto;
flex-grow: 0;
flex-shrink: 0;
order: 0;
position: relative;
z-index: 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@
width: 100%;

.admin__control-text {
-ms-flex-order: 1;
-webkit-appearance: none;
-webkit-flex-grow: 1;
-webkit-flex-shrink: 1;
-webkit-order: 1;
appearance: none;
.lib-vendor-prefix-appearance(none);
background-color: transparent;
border-color: transparent;
box-shadow: none;
Expand All @@ -53,9 +48,6 @@
}

.currency-symbol {
-webkit-flex-basis: auto;
-webkit-flex-grow: 0;
-webkit-flex-shrink: 0;
border: solid @currency-addon-symbol__border-color;
border-width: 0;
box-sizing: border-box;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
*,
*:after,
*:before {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@
&.field-video_swatch_image,
&.field-new_video_disabled {
.admin__field-control {
/**
* @codingStandardsIgnoreStart
*/
#mix-grid .column(3, @field-grid__columns);
//@codingStandardsIgnoreEnd
float: left;
margin-left: 80px;
position: relative;
Expand Down Expand Up @@ -197,7 +201,11 @@
height: 0;

.admin__field-control {
/**
* @codingStandardsIgnoreStart
*/
#mix-grid .column(3, @field-grid__columns);
//@codingStandardsIgnoreEnd
float: left;
margin-left: 80px;
position: relative;
Expand All @@ -221,7 +229,7 @@
}

input[type='checkbox'] {
.lib-css(appearance, none, 1);
.lib-vendor-prefix-appearance(none);
background: @color-white;
border: 1px solid @color-gray68;
border-radius: 2px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@

// Force a scroll bar to appear on IOS devices
&::-webkit-scrollbar {
-webkit-appearance: none;
.lib-vendor-prefix-appearance(none);
height: 4px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// */

.block-footer .action-add {
-webkit-appearance: none;
.lib-vendor-prefix-appearance(none);
&:extend(.action-default, button all);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@

.admin__control-text::-webkit-outer-spin-button,
.admin__control-text::-webkit-inner-spin-button {
-webkit-appearance: none;
.lib-vendor-prefix-appearance(none);
margin: 0;
}

.admin__control-text {
-moz-appearance: textfield;
.lib-vendor-prefix-appearance(textfield);
text-align: center;
width: @data-grid-pager-action__width;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,7 @@ button {
}

&._parent {
.lib-vendor-prefix-display(flex);
.lib-vendor-prefix-flex-direction(row);
display: flex;
flex-direction: row;

> .action-menu-item {
min-width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ button,
html input[type='button'],
input[type='reset'],
input[type='submit'] {
-webkit-appearance: button;
appearance: button;
.lib-vendor-prefix-appearance(button);
cursor: pointer;
}

Expand Down Expand Up @@ -274,17 +273,15 @@ input[type='number'] {

// Address 'appearance' set to 'searchfield' in Safari and Chrome.
input[type='search'] {
-webkit-appearance: textfield;
appearance: textfield;
.lib-vendor-prefix-appearance(textfield);
}

// Remove inner padding and search cancel button in Safari and Chrome on OS X.
// Safari (but not Chrome) clips the cancel button when the search input has padding (and 'textfield' appearance).
input[type='search'] {
&::-webkit-search-cancel-button,
&::-webkit-search-decoration {
-webkit-appearance: none;
appearance: none;
.lib-vendor-prefix-appearance(none);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
display: inline-block;

input[type='text'] {
.lib-css(appearance, none, 1);
.lib-vendor-prefix-appearance(none);
border: 0;
display: inline;
margin: 0;
Expand Down Expand Up @@ -320,10 +320,7 @@
}

li {
.lib-vendor-prefix-display(flex);
.lib-vendor-prefix-flex-direction(row);
display: flex;
flex-direction: row;
transition: background .2s linear;

&:hover {
Expand Down Expand Up @@ -370,7 +367,7 @@
}

.selectmenu-item-action {
.lib-css(appearance, none, 1);
.lib-vendor-prefix-appearance(none);
background: transparent;
border: 0;
color: @text__color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

// Common
.__form-control-pattern() {
-webkit-appearance: none;
.lib-vendor-prefix-appearance(none);
background-color: @field-control__background-color;
border: @field-control__border-width solid @field-control__border-color;
border-radius: @field-control__border-radius;
Expand Down Expand Up @@ -58,7 +58,7 @@
// Select styles
.admin__control-select {
&:extend(.abs-form-control-pattern all);
.lib-css(appearance, none, 1);
.lib-vendor-prefix-appearance(none);
background-image+: url('../images/arrows-bg.svg');
background-position+: ~'calc(100% - 12px)' -34px;
background-size+: auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,7 @@ label.mage-error {

.admin__data-grid-header-row {
.action-select-multiselect {
-webkit-appearance: menulist-button;
appearance: menulist-button;
.lib-vendor-prefix-appearance(menulist-button);
height: 38px;
left: -1rem;
min-width: 0;
Expand Down
5 changes: 2 additions & 3 deletions app/design/adminhtml/Magento/backend/web/css/styles-old.less
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,7 @@

select {
&:not([multiple]) {
.lib-css(appearance, none, 1);

.lib-vendor-prefix-appearance(none);
display: inline-block;
line-height: normal;
min-width: 80px;
Expand Down Expand Up @@ -858,7 +857,7 @@

input[type="radio"],
input[type="checkbox"] {
.lib-css(appearance, none, 1);
.lib-vendor-prefix-appearance(none);
background: @color-white;
border-radius: 2px;
border: 1px solid #adadad;
Expand Down
3 changes: 1 addition & 2 deletions app/design/frontend/Magento/luma/web/css/source/_forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@
}

.select-styling() {
.lib-css(appearance, none, 1);
appearance: none;
.lib-vendor-prefix-appearance(none);
background-size: 30px 60px;
text-indent: .01em;
text-overflow: '';
Expand Down