Skip to content

Commit

Permalink
use webui-disclosure in navigation stories
Browse files Browse the repository at this point in the history
  • Loading branch information
basher committed Apr 3, 2024
1 parent 9e0f2f4 commit 7a4ace3
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 277 deletions.
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "web-ui-boilerplate",
"description": "UI boilerplate for websites/webapps using vanilla HTML/CSS/JavaScript, powered by Storybook, bundled by Parcel.",
"author": "basher",
"version": "2.1.4",
"version": "2.2.0",
"license": "ISC",
"repository": {
"type": "git",
Expand Down
11 changes: 0 additions & 11 deletions ui/src/stylesheets/components/_disclosure.scss

This file was deleted.

2 changes: 0 additions & 2 deletions ui/src/stylesheets/components/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
@use 'button-group';
@use 'card';
@use 'clickable';
@use 'disclosure';
@use 'image';
@use 'image-gallery';
@use 'message';
Expand All @@ -16,7 +15,6 @@
@use 'prose';
@use 'responsive-media';
@use 'search';
@use 'share';
@use 'skin';
@use 'skiplinks';
@use 'slider';
Expand Down
32 changes: 19 additions & 13 deletions ui/src/stylesheets/components/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Dependencies.
border: $border-width-s solid;
flex-direction: column;
inset-block-start: 100%;
inset-inline-start: 0;
padding: $gutter-m;
position: absolute;
z-index: z('popup');
Expand Down Expand Up @@ -84,7 +85,8 @@ Dependencies.
flex-direction: column;
}

&.is-js-enabled {
// Using <webui-disclosure> custom element.
webui-disclosure:defined {
.nav__list {
background-color: $color-background;
border: $border-width-s solid;
Expand All @@ -95,19 +97,23 @@ Dependencies.
}
}

// With disclosure navigation.
// Hamburger with disclosure navigation.
&.nav--disclosure {
> .nav__list {
align-items: unset;
}

.nav__item--has-dropdown {
display: unset;
}

.nav__list--dropdown {
border: 0;
position: relative;
webui-disclosure:defined {
/* stylelint-disable max-nesting-depth */
> .nav__list {
align-items: unset;
}

.nav__item--has-dropdown {
display: unset;
}

.nav__list--dropdown {
border: 0;
position: relative;
}
/* stylelint-enable max-nesting-depth */
}
}
}
Expand Down
22 changes: 0 additions & 22 deletions ui/src/stylesheets/components/_share.scss

This file was deleted.

Loading

0 comments on commit 7a4ace3

Please sign in to comment.