Skip to content

Instantly share code, notes, and snippets.

@colorful-tones
Created September 21, 2018 15:04
Show Gist options
  • Save colorful-tones/7d579cb753b57e276f90af742d92f864 to your computer and use it in GitHub Desktop.
Save colorful-tones/7d579cb753b57e276f90af742d92f864 to your computer and use it in GitHub Desktop.
[Stylelint test #1] Testing possibly 10up Stylelint rules
:root {
/* Colors. */
--color-white: #fff;
--color-dark: #111;
--color-light: #e9e9e8;
--color-brand: #5a6fff;
--color-black-rgb: 0, 0, 0;
--spacing-unit: 0.5rem;
--spacing-unit-2: 1rem;
--spacing-unit-4: 2rem;
/* Max widths. */
--max-width-base: 700px;
--max-width-wide: 1070px;
--max-width-wider: 1280px;
--max-width-full: 1440px;
/* Custom selectors. */
@custom-selector :--headings h1, h2, h3, h4, h5, h6;
}
.site-main {
padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 2);
}
.site-info {
background-color: rgba(var(--color-black-rgb), 0.05);
background-image: url("../../assets/images/src/holo-site-info.png");
background-repeat: no-repeat;
background-size: cover;
color: var(--color-dark);
padding-bottom: calc(var(--spacing-unit) * 8);
padding-top: calc(var(--spacing-unit) * 8);
& + .entry-content {
margin-top: var(--spacing-unit-4);
}
&.-dark {
background-color: var(--color-dark);
background-image: none;
color: var(--color-white);
}
}
.site-info__wrapper {
display: grid;
grid-gap: var(--spacing-unit-4);
grid-template-columns: repeat(6, 1fr);
}
.site-info__welcome,
.site-info__details {
grid-column: span 6;
@media (--medium) {
grid-column: span 2;
}
}
.site-main--home {
padding-left: 0;
padding-right: 0;
padding-top: 0;
@media (--medium) {
display: grid;
grid-template-columns: repeat(6, 1fr);
& .entry {
grid-column: span 2;
}
& .entry--top,
& .grid-wrapper--home,
& .site-info {
grid-column: 1 / -1;
}
& .entry--featured {
grid-column: span 3;
}
}
}
.grid-wrapper--home {
padding: calc(var(--spacing-unit-2) * 7) var(--spacing-unit-2);
display: grid;
grid-gap: calc(var(--spacing-unit-2) * 7) calc(var(--spacing-unit-2) * 4);
grid-template-columns: repeat(6, 1fr);
& .entry {
grid-column: span 6;
& > * {
margin-left: 0;
width: 100%;
}
}
@media (--medium) {
& .entry {
display: flex;
flex-direction: column;
grid-column: span 2;
&:nth-child(4),
&:nth-child(5),
&:nth-child(6),
&:nth-child(7) {
grid-column: span 3;
}
}
& .entry__terms--post_tag {
margin-top: auto;
}
& .entry--type-video {
grid-column: span 6;
}
}
}
.entry__content :--headings {
padding-top: calc(var(--spacing-unit) * 4);
}
.team-quick-links__content a,
.articles-entry__content a,
.entry__content a:not(.wp-block-button__link) {
color: var(--color-brand);
text-decoration: underline;
&:hover,
&:focus,
&:active {
color: var(--color-dark);
text-decoration: none;
}
}
.site-main--hub {
& .site-info__wrapper {
grid-template-columns: repeat(6, auto);
@media (--medium) {
grid-gap: 0 var(--spacing-unit-4);
}
}
& .site-info__welcome {
color: var(--color-brand);
}
& .site-info__subtitle {
grid-column: span 6;
@media (--medium) {
grid-column: 1 / span 2;
}
}
& .site-info__details {
@media (--medium) {
grid-column-start: 4;
grid-row-start: 1;
}
}
}
2:2 ✖ Expected empty line before comment comment-empty-line-before
29:24 ✖ Unexpected quotes function-url-quotes
40:3 ✖ Selector should use lowercase and separate words with selector-class-pattern
hyphens
90:2 ✖ Expected display to come before padding order/properties-alphabetical-order
104:3 ✖ Expected empty line before rule rule-empty-line-before
138:2 ✖ Expected selector ".team-quick-links__content a:focus" no-descending-specificity
to come before selector ".entry__content
a:not(.wp-block-button__link):hover"
138:2 ✖ Expected selector ".articles-entry__content a:focus" to no-descending-specificity
come before selector ".entry__content
a:not(.wp-block-button__link):hover"
139:2 ✖ Expected selector ".team-quick-links__content a:active" no-descending-specificity
to come before selector ".entry__content
a:not(.wp-block-button__link):hover"
139:2 ✖ Expected selector ".team-quick-links__content a:active" no-descending-specificity
to come before selector ".entry__content
a:not(.wp-block-button__link):focus"
139:2 ✖ Expected selector ".articles-entry__content a:active" no-descending-specificity
to come before selector ".entry__content
a:not(.wp-block-button__link):hover"
139:2 ✖ Expected selector ".articles-entry__content a:active" no-descending-specificity
to come before selector ".entry__content
a:not(.wp-block-button__link):focus"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment