mirror of
https://github.com/picocss/pico.git
synced 2025-04-22 17:36:15 -04:00
docs(nav): Add role=button example
This commit is contained in:
parent
6cbc258a0d
commit
43cacb0b93
15 changed files with 36 additions and 13 deletions
|
@ -1887,6 +1887,11 @@ nav :where(a, [role="link"]) {
|
||||||
nav :where(a, [role="link"]):is([aria-current], :hover, :active, :focus) {
|
nav :where(a, [role="link"]):is([aria-current], :hover, :active, :focus) {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
nav [role=button] {
|
||||||
|
margin-right: inherit;
|
||||||
|
margin-left: inherit;
|
||||||
|
padding: var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal);
|
||||||
|
}
|
||||||
|
|
||||||
aside nav,
|
aside nav,
|
||||||
aside ol,
|
aside ol,
|
||||||
|
|
File diff suppressed because one or more lines are too long
2
css/pico.classless.min.css
vendored
2
css/pico.classless.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2085,6 +2085,11 @@ nav :where(a, [role="link"]) {
|
||||||
nav :where(a, [role="link"]):is([aria-current], :hover, :active, :focus) {
|
nav :where(a, [role="link"]):is([aria-current], :hover, :active, :focus) {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
nav [role=button] {
|
||||||
|
margin-right: inherit;
|
||||||
|
margin-left: inherit;
|
||||||
|
padding: var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal);
|
||||||
|
}
|
||||||
|
|
||||||
aside nav,
|
aside nav,
|
||||||
aside ol,
|
aside ol,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1857,6 +1857,11 @@ nav :where(a, [role="link"]) {
|
||||||
nav :where(a, [role="link"]):is([aria-current], :hover, :active, :focus) {
|
nav :where(a, [role="link"]):is([aria-current], :hover, :active, :focus) {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
nav [role=button] {
|
||||||
|
margin-right: inherit;
|
||||||
|
margin-left: inherit;
|
||||||
|
padding: var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal);
|
||||||
|
}
|
||||||
|
|
||||||
aside nav,
|
aside nav,
|
||||||
aside ol,
|
aside ol,
|
||||||
|
|
File diff suppressed because one or more lines are too long
2
css/pico.fluid.classless.min.css
vendored
2
css/pico.fluid.classless.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
css/pico.min.css
vendored
2
css/pico.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -28,7 +28,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" onclick="event.preventDefault()">Link</a></li>
|
<li><a href="#" onclick="event.preventDefault()">Link</a></li>
|
||||||
<li><a href="#" onclick="event.preventDefault()">Link</a></li>
|
<li><a href="#" onclick="event.preventDefault()">Link</a></li>
|
||||||
<li><a href="#" onclick="event.preventDefault()">Link</a></li>
|
<li><a href="#" onclick="event.preventDefault()" role="button">Button</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<footer class="code">
|
<footer class="code">
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<<b>ul</b>>
|
<<b>ul</b>>
|
||||||
<<b>li</b>><<b>a</b> <i>href</i>=<u>"#"</u>>Link</<b>a</b>></<b>li</b>>
|
<<b>li</b>><<b>a</b> <i>href</i>=<u>"#"</u>>Link</<b>a</b>></<b>li</b>>
|
||||||
<<b>li</b>><<b>a</b> <i>href</i>=<u>"#"</u>>Link</<b>a</b>></<b>li</b>>
|
<<b>li</b>><<b>a</b> <i>href</i>=<u>"#"</u>>Link</<b>a</b>></<b>li</b>>
|
||||||
<<b>li</b>><<b>a</b> <i>href</i>=<u>"#"</u>>Link</<b>a</b>></<b>li</b>>
|
<<b>li</b>><<b>a</b> <i>href</i>=<u>"#"</u> <i>role</i>=<u>"button"</u>>Button</<b>a</b>></<b>li</b>>
|
||||||
</<b>ul</b>>
|
</<b>ul</b>>
|
||||||
</<b>nav</b>></code></pre>
|
</<b>nav</b>></code></pre>
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,14 @@ nav {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Minimal support for role="button"
|
||||||
|
[role="button"] {
|
||||||
|
margin-right: inherit;
|
||||||
|
margin-left: inherit;
|
||||||
|
padding: var(--nav-link-spacing-vertical) var(--nav-link-spacing-horizontal);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vertical Nav
|
// Vertical Nav
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue