Skip to content

Commit

Permalink
“Components”: Clarify focus state of “Links” (wikimedia#385)
Browse files Browse the repository at this point in the history
Integrating recent changes in Vector skin with outline-color in
https://phabricator.wikimedia.org/T245887
  • Loading branch information
Volker-E authored Jun 17, 2020
1 parent 3e8c9c0 commit 9ade38b
Show file tree
Hide file tree
Showing 10 changed files with 574 additions and 532 deletions.
4 changes: 2 additions & 2 deletions components/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ <h2>States of links</h2>
<img src="../img/components/links_states.svg" alt="links states">
<figcaption class="figure__caption"></figcaption>
</figure>
<p>Links don't feature a disabled state. Consider using <a href="buttons.html#type-quiet-buttons">quiet buttons</a> for those applications instead.</p>
<p>Links focus outline is the default browser focus, here Blink based browsers only with outline color amendment to <span class="color-hint" style="--color-hint: #36c;" title="#36c">Accent50</span>. This varies in different browsers.<br>Links don't feature a disabled state. Consider using <a href="buttons.html#type-quiet-buttons">quiet buttons</a> for those applications instead.</p>
</section>
<section id="types">
<h2>Types</h2>
<p>By default links are only underlined on interaction (hover, active).</p>
<p>By default, links are only underlined on interaction (hover, active).</p>

<h3>Underlined links</h3>
<p>To suit user preference and for accessibility reasons MediaWiki also provides a setting to always underline links.</p>
Expand Down
5 changes: 5 additions & 0 deletions css/build/wmui-style-guide.css
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,11 @@ sup {
clear: both;
}
/* ::: Text-formatting ::: */
/* Support Blink based browsers. */
/* They use `outline` for focus styles, we're only amending the color here, see T245887. */
:focus {
outline-color: #36c;
}
.is-complementary,
.is-subtle {
color: #72777d;
Expand Down
2 changes: 1 addition & 1 deletion css/build/wmui-style-guide.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/build/wmui-style-guide.min.css.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions css/wmui-style-guide.dev.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
--width-site-desktop-wide: 1140px;
--border-color-heading: var( --wmui-color-base80 );
--border-width-heading: 3px;
--outline-color-base--focus: var( --color-primary--focus );
/* HACK; Add Georgia to serif fallback as long as WikimediaUI Base isn't updated */
--font-family-serif--fallback: Georgia, serif; /* stylelint-disable-line value-keyword-case */
--font-weight-base: 400;
Expand Down Expand Up @@ -283,6 +284,12 @@ sup {
}

/* ::: Text-formatting ::: */
/* Support Blink based browsers. */
/* They use `outline` for focus styles, we're only amending the color here, see T245887. */
:focus {
outline-color: var( --outline-color-base--focus );
}

.is-complementary,
.is-subtle {
color: var( --color-base--subtle );
Expand Down
61 changes: 33 additions & 28 deletions img/components/links_states.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion js/wikimedia-design-style-guide.concat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified resources/WikimediaUI-components_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/WikimediaUI-components_overview.sketch
Binary file not shown.
Loading

0 comments on commit 9ade38b

Please sign in to comment.