Skip to content

Commit

Permalink
WRQ-7108: Remove unnecessary vendor prefixes (#3236)
Browse files Browse the repository at this point in the history
* WRQ-7108: Remove unnecessary vendor prefixes
Enact-DCO-1.0-Signed-off-by: Jiye Kim ([email protected])

* delete `-webkit-overflow-scrolling` and revert `-webkit-user-select`
Enact-DCO-1.0-Signed-off-by: Jiye Kim ([email protected])

* remove deleted css classnames in js code
Enact-DCO-1.0-Signed-off-by: Jiye Kim ([email protected])
  • Loading branch information
vJIYEv authored Jun 28, 2024
1 parent 19ee91a commit 67b7156
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 48 deletions.
5 changes: 0 additions & 5 deletions packages/spotlight/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ let elementMatchesSelector = function (selector) {
};
if (typeof window === 'object') {
elementMatchesSelector = window.Element.prototype.matches ||
window.Element.prototype.matchesSelector ||
window.Element.prototype.mozMatchesSelector ||
window.Element.prototype.webkitMatchesSelector ||
window.Element.prototype.msMatchesSelector ||
window.Element.prototype.oMatchesSelector ||
elementMatchesSelector;
}

Expand Down
1 change: 0 additions & 1 deletion packages/ui/Scrollable/ScrollThumb.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
opacity: 0;
flex: auto;

-webkit-transition: opacity 100ms linear;
transition: opacity 100ms linear;

will-change: transform, top, left, right;
Expand Down
4 changes: 0 additions & 4 deletions packages/ui/Scrollable/Scrollable.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,4 @@
overflow: hidden;
flex: 1 1 100%;
}

.contentNative {
-webkit-overflow-scrolling: touch;
}
}
2 changes: 1 addition & 1 deletion packages/ui/Scrollable/ScrollableNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ class ScrollableBaseNative extends Component {
{className, containerRenderer, noScrollByDrag, rtl, style, ...rest} = this.props,
{isHorizontalScrollbarVisible, isVerticalScrollbarVisible} = this.state,
scrollableClasses = classNames(css.scrollable, className),
contentClasses = classNames(css.content, css.contentNative),
contentClasses = classNames(css.content),
childWrapper = noScrollByDrag ? 'div' : TouchableDiv,
childWrapperProps = {
className: contentClasses,
Expand Down
5 changes: 1 addition & 4 deletions packages/ui/Scrollable/Scrollbar.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
flex: none;

transform: translateZ(0);
-webkit-transform: translateZ(0);
transition: opacity 0.1s linear;
-moz-transition: opacity 0.1s linear;
-webkit-transition: opacity 0.1s linear;

&.vertical {
flex-direction: column;
Expand All @@ -25,7 +22,7 @@
}

&.corner {
-webkit-padding-end: 3px;
padding-inline-end: 3px;
}

/* ScrollThumb */
Expand Down
6 changes: 1 addition & 5 deletions packages/ui/styles/core.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

// Touch interaction
.enact-no-touch-action {
-ms-touch-action: none;
touch-action: none;
}

.enact-untouchable {
Expand All @@ -39,17 +39,13 @@
// Selection
.enact-unselectable {
cursor: default;
-ms-user-select: none;
-webkit-user-select: none;
-moz-user-select: -moz-none;
user-select: none;
}

.enact-selectable {
cursor: auto;
-ms-user-select: element;
-webkit-user-select: text;
-moz-user-select: text;
user-select: text;
}

Expand Down
23 changes: 5 additions & 18 deletions packages/ui/styles/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
}

.enact-composite() {
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);
will-change: transform;
}
Expand Down Expand Up @@ -103,11 +100,11 @@
// */
.remove-margin-on-edge-children() {
> :first-child {
-webkit-margin-start: 0;
margin-inline-start: 0;
}

> :last-child {
-webkit-margin-end: 0;
margin-inline-end: 0;
}
}

Expand All @@ -117,11 +114,11 @@
// */
.remove-padding-on-edge-children() {
> :first-child {
-webkit-padding-start: 0;
padding-inline-start: 0;
}

> :last-child {
-webkit-padding-end: 0;
padding-inline-end: 0;
}
}

Expand All @@ -142,26 +139,17 @@
}

.input-placeholder(@rule) {
&::-webkit-input-placeholder {
@rule();
}
&::-moz-placeholder {
&::placeholder {
@rule();
}
}

// Assign font-kerning rules in a non-proprietary way. Default value being "normal", to enable kerning.
.font-kerning(@val: normal) {
-webkit-font-kerning: @val;
font-kerning: @val;
}

// Provide a set of rules to assign to each vendor-prefixed pseudo selector
.vendor-fullscreen(@rule) {
&:-webkit-full-screen { @rule(); }
&:-moz-full-screen { @rule(); }
&:-ms-fullscreen { @rule(); }
&:-o-full-screen { @rule(); }
&:fullscreen { @rule(); }
}

Expand Down Expand Up @@ -211,7 +199,6 @@

.border-box() {
box-sizing: border-box;
-moz-box-sizing: border-box;
}

// Helpful debugging way to understand how LESS variables are being interpreted
Expand Down
5 changes: 1 addition & 4 deletions packages/ui/useScroll/Scrollbar.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
flex: none;

transform: translateZ(0);
-webkit-transform: translateZ(0);
transition: opacity 0.1s linear;
-moz-transition: opacity 0.1s linear;
-webkit-transition: opacity 0.1s linear;

&.vertical {
flex-direction: column;
Expand All @@ -27,7 +24,7 @@
}

&.corner {
-webkit-padding-end: 3px;
padding-inline-end: 3px;
}

/* ScrollbarTrack */
Expand Down
1 change: 0 additions & 1 deletion packages/ui/useScroll/ScrollbarTrack.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
opacity: 0;
flex: auto;

-webkit-transition: opacity 100ms linear;
transition: opacity 100ms linear;

will-change: transform, top, left, right;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/useScroll/useScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,7 @@ const useScrollBase = (props) => {
});

assignProperties('scrollContentWrapperProps', {
className: scrollMode === 'translate' ? [css.scrollContentWrapper] : [css.scrollContentWrapper, css.scrollContentWrapperNative], // scrollMode 'native'
className: [css.scrollContentWrapper],
...(!noScrollByDrag && {
flickConfig,
onDrag: onDrag,
Expand Down
4 changes: 0 additions & 4 deletions packages/ui/useScroll/useScroll.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,4 @@
overflow: hidden;
flex: 1 1 100%;
}

.scrollContentWrapperNative {
-webkit-overflow-scrolling: touch;
}
}

0 comments on commit 67b7156

Please sign in to comment.