Moving list styles complete to use @apply

This commit is contained in:
Jeff Avallone 2018-02-15 09:08:50 -05:00
parent 672ded87af
commit 895827e881
7 changed files with 10 additions and 31 deletions

View File

@ -2,9 +2,7 @@
exports[`Footer rendering 1`] = ` exports[`Footer rendering 1`] = `
<footer> <footer>
<ul <ul>
className="inline with-separator"
>
<li> <li>
<Trans> <Trans>
Created by Created by

View File

@ -5,7 +5,7 @@ import './style.css';
const Footer = () => ( const Footer = () => (
<footer> <footer>
<ul className="inline with-separator"> <ul>
<li> <li>
<Trans>Created by <a href="mailto:jeff.avallone@gmail.com">Jeff Avallone</a></Trans> <Trans>Created by <a href="mailto:jeff.avallone@gmail.com">Jeff Avallone</a></Trans>
</li> </li>

View File

@ -3,6 +3,11 @@
footer { footer {
margin: var(--spacing-margin) 0; margin: var(--spacing-margin) 0;
& ul {
@apply --inline-list;
@apply --with-separator;
}
& img { & img {
vertical-align: text-top; vertical-align: text-top;
width: 80px; width: 80px;

View File

@ -12,9 +12,7 @@ exports[`Header rendering 1`] = `
Regexper Regexper
</a> </a>
</h1> </h1>
<ul <ul>
className="inline"
>
<li> <li>
<a <a
href="https://github.com/javallone/regexper-static" href="https://github.com/javallone/regexper-static"

View File

@ -10,7 +10,7 @@ const Header = () => (
<a href="/">Regexper</a> <a href="/">Regexper</a>
</h1> </h1>
<ul className="inline"> <ul>
<li><a href="https://github.com/javallone/regexper-static"> <li><a href="https://github.com/javallone/regexper-static">
<GithubIcon/><Trans>Source on GitHub</Trans> <GithubIcon/><Trans>Source on GitHub</Trans>
</a></li> </a></li>

View File

@ -38,6 +38,7 @@
} }
& ul { & ul {
@apply --inline-list;
line-height: var(--header-height); line-height: var(--header-height);
position: absolute; position: absolute;
top: 0; top: 0;

View File

@ -16,26 +16,3 @@ body {
a { a {
color: inherit; color: inherit;
} }
ul:global(.inline) {
list-style: none;
margin: 0;
padding: 0;
& li {
list-style-type: none;
display: inline-block;
white-space: nowrap;
}
&:global(.with-separator) {
& li:after {
content: '//';
padding: 0 0.5rem;
}
& li:last-child:after {
content: '';
}
}
}