Skip to content

Commit

Permalink
feat(ScrollView): add sbanken styling to scrollbar (#2514)
Browse files Browse the repository at this point in the history
  • Loading branch information
joakbjerk authored Jul 4, 2023
1 parent 23b3935 commit 5d2011e
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const TextareaExampleRowsCols = () => (
rows="2"
cols="20"
value="Textarea value\nNewline"
spellCheck={false}
on_change={({ value }) => {
console.log('on_change', value)
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,6 @@
z-index: 1;

@include scrollY(auto);
:global(.eufemia-theme__sbanken) & {
--scrollbar-track-color: var(--sb-color-gray-light-2);
--scrollbar-thumb-color: var(--sb-color-gray-dark-3);
--scrollbar-thumb-hover-color: var(--sb-color-purple);
}

@include allBelow(medium) {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ export default {
'--shadow-default-y': '8px',
'--shadow-default-blur-radius': '16px',
'--shadow-default-color': 'rgb(51 51 51 / 8%)',
'--easing-default': 'cubic-bezier(0.42, 0, 0, 1)'
'--easing-default': 'cubic-bezier(0.42, 0, 0, 1)',
'--scrollbar-track-width': '0.5rem',
'--scrollbar-thumb-width': '0.5rem',
'--scrollbar-track-color': 'var(--color-black-8)',
'--scrollbar-thumb-color': 'var(--color-sea-green)',
'--scrollbar-thumb-hover-color': 'var(--color-emerald-green)'
}; // prettier-ignore
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ exports[`Tabs scss has to match style dependencies css 1`] = `
flex: 0 1 auto;
overflow-x: auto;
overscroll-behavior: contain;
--scrollbar-track-width: 0.5rem;
--scrollbar-thumb-width: 0.5rem;
--scrollbar-track-color: var(--color-black-8);
--scrollbar-thumb-color: var(--color-sea-green);
--scrollbar-thumb-hover-color: var(--color-emerald-green);
-webkit-overflow-scrolling: touch;
-ms-overflow-style: auto;
scrollbar-color: var(--scrollbar-thumb-color, #888) transparent;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,6 @@ exports[`Textarea scss have to match default theme snapshot 1`] = `
background-color: var(--color-white);
overflow-y: auto;
overscroll-behavior: contain;
--scrollbar-track-width: 0.5rem;
--scrollbar-thumb-width: 0.5rem;
--scrollbar-track-color: var(--color-black-8);
--scrollbar-thumb-color: var(--color-sea-green);
--scrollbar-thumb-hover-color: var(--color-emerald-green);
-webkit-overflow-scrolling: touch;
-ms-overflow-style: auto;
scrollbar-color: var(--scrollbar-thumb-color, #888) transparent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ html[data-visual-test] .dnb-drawer-list__portal__style {
transition: max-height 300ms var(--easing-default);
overflow-y: auto;
overscroll-behavior: contain;
--scrollbar-track-width: 0.5rem;
--scrollbar-thumb-width: 0.5rem;
--scrollbar-track-color: var(--color-black-8);
--scrollbar-thumb-color: var(--color-sea-green);
--scrollbar-thumb-hover-color: var(--color-emerald-green);
-webkit-overflow-scrolling: touch;
-ms-overflow-style: auto;
scrollbar-color: var(--scrollbar-thumb-color, #888) transparent;
Expand Down
6 changes: 0 additions & 6 deletions packages/dnb-eufemia/src/style/core/utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@
}

@mixin scrollbarAppearance() {
--scrollbar-track-width: 0.5rem;
--scrollbar-thumb-width: 0.5rem;
--scrollbar-track-color: var(--color-black-8);
--scrollbar-thumb-color: var(--color-sea-green);
--scrollbar-thumb-hover-color: var(--color-emerald-green);

// older iOS safari
-webkit-overflow-scrolling: touch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
--line-height-medium: var(--sb-line-height-medium);
--line-height-large: var(--sb-line-height-large);
--line-height-x-large: var(--sb-line-height-x-large);

// Scrollbar
--scrollbar-track-width: 0.5rem;
--scrollbar-thumb-width: 0.5rem;
--scrollbar-track-color: var(--sb-color-gray-light-2);
--scrollbar-thumb-color: var(--sb-color-gray-dark-3);
--scrollbar-thumb-hover-color: var(--sb-color-purple);
}

// change heading to use MaisonNeueHeadings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@
// Easing
--easing-default: cubic-bezier(0.42, 0, 0, 1);

// Scrollbar
--scrollbar-track-width: 0.5rem;
--scrollbar-thumb-width: 0.5rem;
--scrollbar-track-color: var(--color-black-8);
--scrollbar-thumb-color: var(--color-sea-green);
--scrollbar-thumb-hover-color: var(--color-emerald-green);

@if mixin-exists('propertiesCustomisation') {
@include propertiesCustomisation();
}
Expand Down

1 comment on commit 5d2011e

@vercel
Copy link

@vercel vercel bot commented on 5d2011e Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.