-
Notifications
You must be signed in to change notification settings - Fork 18
[hold] Banner and Notification components update #735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ollips
wants to merge
8
commits into
main
Choose a base branch
from
olga/banner-notification-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b2fa1be
Banner and Notification components update
ollips 2249c16
Adding pattern pages to a11y list
ollips 6e158d0
Refactoring
ollips de50e63
Refactoring .buttons
ollips 06fdfb7
Adding a few more examples
ollips bdf78de
Aligning icons, text, action buttons to be on the same level
ollips 12212dd
using token in buttons
ollips 3d7c9a9
Fixing loading icon positioning
ollips File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,5 @@ | ||
--- | ||
'@microsoft/atlas-site': minor | ||
--- | ||
|
||
Updating banner and notification components documentation and creating pattern pages for them. |
This file contains hidden or 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,5 @@ | ||
--- | ||
'@microsoft/atlas-css': major | ||
--- | ||
|
||
Updating banner and notification components. |
This file contains hidden or 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,5 @@ | ||
--- | ||
'@microsoft/atlas-css': patch | ||
--- | ||
|
||
Refactoring .buttons |
This file contains hidden or 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 |
---|---|---|
@@ -1,74 +1,118 @@ | ||
$banner-background: $info-background !default; | ||
$banner-padding: $spacer-5 !default; | ||
$banner-min-height: 50px !default; | ||
$banner-background: $secondary-background !default; | ||
$banner-padding-block: 0.75em !default; | ||
|
||
$banner-font-size: $font-size-7 !default; | ||
$banner-color: $info-dark !default; | ||
$banner-gap: $spacer-3 !default; | ||
|
||
$banner-border-color: $border-white-high-contrast !default; | ||
$banner-border-width: $border-width !default; | ||
$banner-icon-size: 1.145em !default; | ||
$banner-icon-block-spacing: 0.35em !default; | ||
|
||
$banner-content-block-spacing: 0.3em !default; | ||
|
||
$banner-color: $text !default; | ||
$banner-font-size: $font-size-8 !default; | ||
|
||
$banner-dismiss-margin: $spacer-2 !default; | ||
$banner-button-font-size: $font-size-9 !default; | ||
|
||
$banner-border-color: $control-border !default; | ||
$banner-border-width: $border-width !default; | ||
|
||
.banner { | ||
@extend %layout-gap; | ||
|
||
display: grid; | ||
position: relative; | ||
grid-template: auto / 1fr auto; | ||
grid-template-areas: 'banner-content dismiss'; | ||
align-items: flex-start; | ||
min-height: $banner-min-height; | ||
outline-color: $text; | ||
background-color: $banner-background; | ||
color: $banner-color; | ||
font-size: $banner-font-size; | ||
line-height: $line-height-normal; | ||
padding-block: $banner-padding; | ||
grid-template: auto / auto 1fr auto; | ||
grid-template-areas: 'icon banner-content dismiss'; | ||
padding-block: $banner-padding-block; | ||
word-wrap: break-word; | ||
word-break: break-word; | ||
border-block: $banner-border-width solid $banner-border-color; | ||
|
||
&.is-loading { | ||
color: transparent; | ||
@each $name, $color-set in $colors { | ||
$base: nth($color-set, $color-index-base); | ||
$dark: nth($color-set, $color-index-dark); | ||
$background: nth($color-set, $color-index-background); | ||
|
||
> :first-child { | ||
margin-inline-start: calc($banner-padding + 0.375em); | ||
&.banner-#{$name} { | ||
border-color: $dark; | ||
background-color: $background; | ||
|
||
&.is-loading::before { | ||
border-color: transparent transparent $dark $dark; | ||
} | ||
|
||
.banner-icon { | ||
color: $dark; | ||
} | ||
} | ||
} | ||
|
||
&.is-loading { | ||
color: transparent; | ||
|
||
&::before { | ||
@include loader; | ||
|
||
position: absolute; | ||
inset-block-start: $banner-padding; | ||
inset-inline-start: $layout-gap; | ||
border-color: transparent transparent $banner-color $banner-color; | ||
|
||
@include widescreen { | ||
inset-inline-start: $layout-widescreen-gap; | ||
} | ||
} | ||
} | ||
|
||
.banner-content { | ||
grid-area: banner-content; | ||
|
||
a:not(.button) { | ||
color: currentColor; | ||
.banner-title { | ||
font-weight: $weight-semibold; | ||
text-decoration: underline; | ||
margin-inline-end: $banner-gap; | ||
} | ||
|
||
.theme-high-contrast & { | ||
color: $hyperlink; | ||
} | ||
a:not(.button) { | ||
text-decoration: underline; | ||
|
||
&:hover { | ||
text-decoration-thickness: 0.15em; | ||
} | ||
} | ||
|
||
.button { | ||
font-size: $banner-button-font-size; | ||
} | ||
|
||
p { | ||
max-width: $reading-max-width; | ||
|
||
&:first-child { | ||
margin-block-start: $banner-content-block-spacing; | ||
} | ||
} | ||
} | ||
|
||
.banner-icon, | ||
&.is-loading::before { | ||
flex-shrink: 0; | ||
font-size: $banner-icon-size; | ||
line-height: 1; | ||
grid-area: icon; | ||
margin-inline-end: $banner-gap; | ||
} | ||
|
||
.banner-dismiss { | ||
@include dismiss-square; | ||
|
||
grid-area: dismiss; | ||
margin-inline-start: $banner-dismiss-margin; | ||
margin-inline-start: $banner-gap; | ||
} | ||
|
||
.banner-icon, | ||
.banner-dismiss, | ||
&.is-loading::before { | ||
margin-block-start: $banner-icon-block-spacing; | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.