Skip to content
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

fix: sass: moves scroll bars mixin to global scope and adds it to dropdown #726

Merged
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
36 changes: 0 additions & 36 deletions src/components/DateTimePicker/DatePicker/Styles/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,42 +55,6 @@ $picker-input-padding-vertical: max(
padding: $padding-top 0 $padding-bottom $padding-horizontal;
}

// Picker scroll bars
@mixin scroll-bars() {
overflow: auto;
-ms-overflow-style: none;

&::-webkit-scrollbar {
background-color: transparent;
height: $space-m;
width: $space-m;
}

&::-webkit-scrollbar-button {
display: none;
}

&::-webkit-scrollbar-corner {
background-color: transparent;
}

&::-webkit-scrollbar-thumb {
background-color: transparent;
border: 5px solid transparent;
border-radius: $border-radius-xl;
box-shadow: 4px 0px 0px 4px rgba(105, 113, 127, 0.7) inset;
}

&::-webkit-scrollbar-track {
-webkit-box-shadow: none;
background-color: transparent;
}

&::-webkit-scrollbar-track-piece {
background-color: transparent;
}
}

// Input placeholder text mixin
@mixin placeholder($color: var(--picker-input-placeholder-color)) {
// Firefox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@
}

&-column {
@include scroll-bars();
@include scroll-bars;
dkilgore-eightfold marked this conversation as resolved.
Show resolved Hide resolved

background: var(--picker-column-background-color);
flex: none;
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dropdown/dropdown.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
}

.dropdown-wrapper {
@include scroll-bars;

background: var(--dropdown-background-color);
padding: $space-xs;
box-shadow: $shadow-object-m;
Expand Down
39 changes: 2 additions & 37 deletions src/components/Table/Internal/octable.module.scss
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
@mixin scroll-bars() {
overflow: auto;
-ms-overflow-style: none;

&::-webkit-scrollbar {
background-color: transparent;
height: $space-m;
width: $space-m;
}

&::-webkit-scrollbar-button {
display: none;
}

&::-webkit-scrollbar-corner {
background-color: transparent;
}

&::-webkit-scrollbar-thumb {
background-color: transparent;
border: 5px solid transparent;
border-radius: $border-radius-xl;
box-shadow: 4px 0px 0px 4px rgba(105, 113, 127, 0.7) inset;
}

&::-webkit-scrollbar-track {
-webkit-box-shadow: none;
background-color: transparent;
}

&::-webkit-scrollbar-track-piece {
background-color: transparent;
}
}

.table {
position: relative;
box-sizing: border-box;
Expand Down Expand Up @@ -293,13 +258,13 @@
}

&-content {
@include scroll-bars();
@include scroll-bars;

color: var(--table-foreground-color);
}

&-body {
@include scroll-bars();
@include scroll-bars;

border-bottom-left-radius: $table-border-radius;
border-bottom-right-radius: $table-border-radius;
Expand Down
39 changes: 39 additions & 0 deletions src/styles/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,45 @@
background: none;
}

@mixin scroll-bars {
overflow: auto;
-ms-overflow-style: none;

&::-webkit-scrollbar {
background-color: transparent;
height: $space-m;
width: $space-m;
}

&::-webkit-scrollbar-button {
display: none;
}

&::-webkit-scrollbar-corner {
background-color: transparent;
}

&::-webkit-scrollbar-thumb {
background-color: transparent;
border: 5px solid transparent;
border-radius: $border-radius-xl;
box-shadow: 4px 0px 0px 4px rgba(105, 113, 127, 0.7) inset;
height: $space-xxxl;
}

&::-webkit-scrollbar-track {
-webkit-box-shadow: none;
background-color: transparent;
}

&::-webkit-scrollbar-track-piece {
background-color: transparent;
}

// Firefox
scrollbar-color: rgba(105, 113, 127, 0.7) transparent;
}

@mixin no-scrollbars {
// IE and Edge
-ms-overflow-style: none;
Expand Down
Loading