Skip to content

Commit

Permalink
feat: Optimize CSS to avoir importing cozy-ui classes in double
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Feb 15, 2024
1 parent a0a3a6e commit e410aa7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/Bar.jsx
Expand Up @@ -120,7 +120,7 @@ export const Bar = ({
data-tutorial="apps-mobile"
>
<Icon icon={SvgIconApps} width={16} height={16} color="currentColor" />
<span className="coz-bar-hidden">{t('drawer')}</span>
<span className="u-visuallyhidden">{t('drawer')}</span>
</button>
) : null
}
Expand Down
2 changes: 1 addition & 1 deletion src/styles/bar.css
Expand Up @@ -2,7 +2,7 @@
position: fixed;
top: 0;
left: 0;
z-index: var(--z-index-bar);
z-index: var(--zIndex-bar);
display: flex;
align-items: stretch;
flex-shrink: 0;
Expand Down
12 changes: 0 additions & 12 deletions src/styles/index.styl
Expand Up @@ -10,15 +10,3 @@
@import './drawer.css'

@import './theme.styl'

@import 'settings/z-index'
@import 'components/button.styl' // To import $visuallyhidden

:root {
--z-index-bar: $bar-index;
--z-index-selection: $selection-index;
--z-index-over-selection: $selection-index + 1;
}

.coz-bar-hidden
@extend $visuallyhidden

0 comments on commit e410aa7

Please sign in to comment.