Skip to content

Instantly share code, notes, and snippets.

@yuko-m
Created June 6, 2019 08:26
Show Gist options
  • Save yuko-m/4e6d390ff3b29cc4dc8c6ae56e881447 to your computer and use it in GitHub Desktop.
Save yuko-m/4e6d390ff3b29cc4dc8c6ae56e881447 to your computer and use it in GitHub Desktop.
`list-style: none` な `ul` `ol` が Safari で ARIA Role を失うので、忘れずに role=list で補うための対策
$color-error: #c53d43;
$color-highlight: #fff;
@mixin unstyled-list {
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
list-style: none;
&:not([role])::after {
content: "Safari のために role=list を記述しましょう";
position: absolute;
padding-right: 0.5em;
padding-left: 0.5em;
border-radius: 4px;
background-color: $color-error;
color: $color-highlight;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment