-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #553 from silx-kit/split-css
Split domain slider styles into multiple modules
- Loading branch information
Showing
8 changed files
with
168 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
src/h5web/toolbar/controls/DomainSlider/DomainTooltip.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
.tooltip { | ||
composes: popup from '../../Toolbar.module.css'; | ||
left: 50%; | ||
min-width: 17em; | ||
transform: translate(-50%, 100%); | ||
} | ||
|
||
.tooltipInner { | ||
composes: popupInner from '../../Toolbar.module.css'; | ||
padding: 1rem 0.75rem; | ||
} | ||
|
||
.tooltipInner > p { | ||
margin-bottom: 0.75rem; | ||
} | ||
|
||
.tooltipInner > p:last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
.minMax { | ||
display: grid; | ||
grid-template-columns: [label] auto [value] 1fr [actions] 2.5em; | ||
grid-gap: 0.5rem; | ||
margin-bottom: 1rem; | ||
font-weight: bold; | ||
color: var(--near-black); | ||
} | ||
|
||
.minMax > h3, | ||
.minMax > p { | ||
margin-bottom: 0; | ||
} | ||
|
||
.minMax > h3 { | ||
grid-column: label; | ||
text-transform: uppercase; | ||
font-size: inherit; | ||
} | ||
|
||
.value { | ||
grid-column: value; | ||
display: flex; | ||
align-items: center; | ||
text-align: right; | ||
} | ||
|
||
.value::before { | ||
flex: 1 1 0%; | ||
content: ''; | ||
min-width: 1em; | ||
margin-right: 0.5rem; | ||
margin-top: 0.5rem; | ||
border-bottom: 2px dotted currentColor; | ||
color: var(--black); | ||
} | ||
|
||
.value[data-error] { | ||
color: var(--warn); | ||
} | ||
|
||
.dataRange { | ||
white-space: nowrap; | ||
} | ||
|
||
.dataRange > span { | ||
margin-left: 0.5rem; | ||
} | ||
|
||
.autoscale { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.autoscale > button:first-of-type { | ||
margin-left: 0.5rem; | ||
} | ||
|
||
.error { | ||
font-size: 0.9375em; | ||
font-weight: 600; | ||
color: var(--warn); | ||
} | ||
|
||
.error > svg { | ||
vertical-align: -0.125em; | ||
} | ||
.error > strong { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.thumb { | ||
top: 0; | ||
bottom: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: var(--thumb-size); /* fixed size regardless of autoscale */ | ||
cursor: ew-resize; | ||
} | ||
|
||
.thumbBtnLike { | ||
position: relative; | ||
padding: 0; | ||
border-radius: 50%; | ||
box-shadow: var(--btn-shadow-idle) var(--btn-shadow-dark-color); | ||
transition: background-color 0.05s ease-in-out, box-shadow 0.05s ease-in-out; | ||
} | ||
|
||
.thumb[data-auto='false'] > .thumbBtnLike { | ||
width: var(--thumb-size); | ||
height: var(--thumb-size); | ||
background-color: var(--secondary); | ||
} | ||
|
||
.thumb[data-auto='true'] > .thumbBtnLike { | ||
width: var(--thumb-size-auto); | ||
height: var(--thumb-size-auto); | ||
background-color: var(--secondary-light); | ||
} | ||
|
||
.thumb[data-auto='false']:hover > .thumbBtnLike { | ||
opacity: 0.8; | ||
box-shadow: var(--btn-shadow-idle-hover) var(--btn-shadow-dark-color); | ||
} | ||
|
||
.thumb[data-auto='true']:hover > .thumbBtnLike { | ||
box-shadow: var(--btn-shadow-idle-hover) var(--btn-shadow-dark-color); | ||
} | ||
|
||
.thumb[data-error] { | ||
color: var(--warn); | ||
font-size: 1.125em; | ||
} | ||
|
||
.icon { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
/* Tweak centering of autoscale icons to compensate for inset shadows */ | ||
transform: translate(-52%, -52%); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.track { | ||
position: relative; | ||
flex: 1 1 0%; | ||
align-self: center; | ||
height: 0.5rem; | ||
margin: 0 calc(var(--thumb-size) / 2); /* make track end in middle of thumbs */ | ||
background-color: var(--secondary-dark-15); | ||
box-shadow: var(--btn-shadow-pressed) var(--btn-shadow-color); | ||
border-radius: 0.25rem; | ||
overflow: hidden; /* crop data track to root track's border radius */ | ||
} | ||
|
||
.dataTrack { | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
background-color: var(--secondary-dark); | ||
box-shadow: 0 -2px 3px inset var(--secondary-darker); | ||
border-radius: 2px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.