-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract and refactor annotator toolbar SASS
- Loading branch information
1 parent
0c94bfb
commit 352e425
Showing
5 changed files
with
117 additions
and
103 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
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
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,77 @@ | ||
@use "sass:color"; | ||
|
||
@use '../variables' as var; | ||
|
||
@use '../mixins/buttons'; | ||
@use '../mixins/layout'; | ||
@use '../mixins/utils'; | ||
|
||
// note: These components CSS classes are nested inside | ||
// .annotator-frame to avoid being overridden by the | ||
// CSS reset styles applied to .annotator-frame, which would otherwise | ||
// have higher specificity | ||
.annotator-frame { | ||
// the vertical toolbar at the left-edge of the sidebar | ||
// which provides controls for toggling the sidebar, | ||
// toggling highlights etc. | ||
|
||
.annotator-toolbar { | ||
position: absolute; | ||
left: -(var.$annotator-toolbar-width); | ||
width: var.$annotator-toolbar-width; | ||
z-index: 2; | ||
} | ||
|
||
.annotator-toolbar-buttonbar { | ||
@include layout.vertical-rhythm(5px); | ||
margin-top: var.$layout-space--small; | ||
} | ||
|
||
// Common styling for buttons in the toolbar | ||
@mixin annotator-button { | ||
@include buttons.button--icon-only($with-active-state: false); | ||
// These toolbar buttons are slightly lighter than other icon buttons | ||
color: var.$grey-5; | ||
background: var.$color-background; | ||
} | ||
|
||
// Toolbar button with icon | ||
.annotator-toolbar-button { | ||
@include annotator-button; | ||
@include utils.shadow; | ||
@include utils.border; | ||
border-radius: var.$annotator-border-radius; | ||
} | ||
|
||
// Control to collapse/expand the sidebar | ||
.annotator-toolbar__sidebar-toggle { | ||
@include annotator-button; | ||
@include utils.border--left; | ||
@include utils.border--bottom; | ||
// Precise positioning of expand/collapse icon | ||
padding-left: 2px; | ||
// Make the button fill the entire width of the toolbar and the | ||
// entire height of the top bar | ||
width: var.$annotator-toolbar-width; | ||
height: var.$top-bar-height; | ||
// Lighten the icon color | ||
color: var.$grey-semi; | ||
} | ||
|
||
/** Visible with clean theme */ | ||
.annotator-toolbar__sidebar-close { | ||
@include buttons.reset-native-btn-styles; | ||
@include buttons.button-hover; | ||
@include utils.border; | ||
border-right-width: 0; | ||
background: var.$color-background; | ||
box-shadow: var.$annotator-shadow--sidebar; | ||
color: var.$grey-5; | ||
// Precise positioning of close button | ||
padding: 1px 6px; | ||
width: 27px; | ||
height: 27px; | ||
margin-top: 140px; | ||
margin-left: 6px; | ||
} | ||
} |
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