Skip to content

Commit

Permalink
Move sidemenu css styles up to the sidebar styles global css file
Browse files Browse the repository at this point in the history
Given this is css that is no longer specific to the sidemenu component
itself and is in itself to be used nested within an `.op-sidebar` element, it
makes sense to extract this out and make it globally available to other sections
of the application.
  • Loading branch information
aaron-contreras committed Jul 19, 2023
1 parent 31a7bf4 commit 31daec6
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 64 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const sidemenuSelector = 'op-sidemenu';
@Component({
selector: sidemenuSelector,
templateUrl: './sidemenu.component.html',
styleUrls: ['./sidemenu.component.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class OpSidemenuComponent {
Expand Down
63 changes: 62 additions & 1 deletion frontend/src/global_styles/content/_sidebar.sass
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,65 @@
.button .spot-icon
margin-right: 0.5rem

@import 'app/shared/components/sidemenu/sidemenu.component'
.op-sidemenu
display: flex
flex-direction: column
font-size: 14px

&--title
display: flex
background: transparent
color: var(--main-menu-fieldset-header-color)
border: 0
text-transform: uppercase
padding: 8px 12px
margin-top: 12px
font-size: 12px
cursor: pointer

&.-spread
justify-content: space-between

&:hover
background: var(--main-menu-bg-hover-background)
color: var(--main-menu-hover-font-color)

&--items
list-style: none

&_collapsed
display: none

&--item-action
display: flex
align-items: center
color: var(--main-menu-font-color)
padding: 8px 12px 8px 32px

&:hover
background: var(--main-menu-bg-hover-background)
color: var(--main-menu-hover-font-color)

&_active
background: var(--main-menu-bg-selected-background)
color: var(--main-menu-selected-font-color)

&_active-child
background: var(--main-menu-bg-selected-background)
color: var(--main-menu-selected-font-color)

&_with_icon
padding-left: 12px

&--item-title
margin-right: auto
overflow: hidden
text-overflow: ellipsis
white-space: nowrap
line-height: 30px
text-decoration: none
width: 100%

&--item-icon
font-size: 24px
margin-right: 8px

0 comments on commit 31daec6

Please sign in to comment.