Skip to content

Commit

Permalink
fix: tighten up the menu to fit more content (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydw committed Jul 7, 2021
1 parent cf4f2ac commit dcca4f3
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/sass/_config.sass
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ $le-font-size: 14px !default
$le-font-size-small: 12px !default
$le-font-size-large: 18px !default
$le-font-size-icon: 18px !default
$le-font-size-icon-menu: 16px !default
$le-font-size-icon-small: 14px !default
$le-font-size-icon-large: 22px !default
$le-line-height: 1 !default
Expand Down
19 changes: 9 additions & 10 deletions src/sass/ui/_actions.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
align-items: center
display: flex
flex-flow: row
column-gap: $le-space-xxsmall
margin: 0 $le-space-medium
position: absolute
right: 0

&--slim
margin: 0 $le-space-small
margin: 0 $le-space-xsmall

.le__actions__action
margin-right: $le-space-small
background: var(--list-item-background-color)
border-radius: $le-radius-medium

&--extreme
color: $le-color-extreme

&--warning
color: $le-color-warning

&:first-child
margin-left: $le-space-small
&:hover
color: var(--color-on-background)
background: var(--color-background)
31 changes: 22 additions & 9 deletions src/sass/ui/_list.sass
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.le__list
cursor: default

&:last-child
margin-bottom: $le-space-medium

Expand All @@ -7,7 +9,7 @@
overflow-y: auto

&--indent
padding-left: $le-space-large
padding-left: $le-space-medium

> .le__list
padding-left: $le-space-medium
Expand Down Expand Up @@ -100,12 +102,15 @@
color: var(--color-secondary-dark)
font-weight: 700

// Prevent item immediately under the heading from indenting.
& + .le__list
padding-left: 0

&--emphasis
font-weight: 700

.le__actions
opacity: 0
transition: opacity $le-speed-xfast

&.le__clickable
position: relative
Expand All @@ -115,6 +120,7 @@
z-index: 1

&.le__clickable::after
background-color: var(--list-item-background-color)
bottom: 0
content: ''
display: block
Expand All @@ -125,14 +131,12 @@
z-index: 0

&.le__clickable:hover
--list-item-background-color: var(--color-tertiary)
color: var(--color-on-tertiary)

.le__actions
opacity: 1

&::after
background-color: var(--color-tertiary)

&--primary.le__clickable,
&--primary.le__clickable:hover
color: var(--color-primary)
Expand All @@ -143,11 +147,9 @@

&--selected,
&--selected.le__clickable:hover
--list-item-background-color: var(--color-secondary)
color: var(--color-on-secondary)

&::after
background-color: var(--color-secondary)

.le__list__item__label
flex-grow: 1
line-height: $le-line-height-paragraph
Expand All @@ -166,4 +168,15 @@
margin: $le-space-small 0

.le__list__item--pad_vertical &
margin: 0 $le-space-medium 0 0
margin: 0 $le-space-medium 0 0

.le__list__item__icon
align-items: center
display: flex
justify-content: center
height: $le-font-size-icon-menu
width: $le-font-size-icon-menu

.material-icons
font-size: $le-font-size-icon-menu
padding: 0

0 comments on commit dcca4f3

Please sign in to comment.