Replace zen grids with css grid. Move print styles print style file. Remove Drupal specific styles.

This commit is contained in:
Fredrik Jonsson 2017-07-16 13:55:22 +02:00
commit 265a50cda5
10 changed files with 201 additions and 398 deletions

View file

@ -2,7 +2,7 @@
//
// A simple box style.
//
// A Drupal block is often styled as a box. However, this design component is
// A block is often styled as a box. However, this design component is
// not applied to any blocks by default; it is used as an example of how to
// build and document a CSS component.
//
@ -35,19 +35,9 @@
}
// Sass compiles this nested ruleset's selector into:
// .box:focus, .box:hover, .box.is-focus, .box--is-focus,
// %box:focus, %box:hover, %box.is-focus, %box--is-focus {}
//
// The ".box--is-focus" class is a stray class we don't actually want, but we
// deal with it because we often want a placeholder selector like
// %box--is-focus in case we need to use @extends later.
//
// The ".is-" part of the class name is a Drupal 8 BEM naming convention that
// indicates the "focus" is a _state_ of the "box" component.
// .box:focus, .box:hover, %box:focus, %box:hover
&:focus,
&:hover,
&.is-focus,
&--is-focus {
&:hover {
border-color: color(text);
}
@ -59,28 +49,3 @@
border-color: color(link);
}
}
//
// Drupal selectors.
//
// In this part of the file, we write some fugly selectors if we can't figure
// out how to insert the class we want (.box) into the Drupal theme system. Then
// we @extend from the fugly selector into the nicely-written component
// selector.
//
// You could create a theme hook suggestion and override the block.tpl.php just
// for the sidebar regions or write a HOOK_preprocess_block() function to check
// for the regions and insert the classes into the right variables, or, if you
// have no idea what I'm talking about, you could just use this fugly CSS
// selector:
//
// [class$="sidebar"] {
// .block {
// @extend %box;
// }
//
// .block__title {
// @extend %box__title;
// }
// }

View file

@ -24,15 +24,3 @@
@extend %hidden;
}
}
//
// Drupal selectors.
//
.element-hidden {
@extend %js-hidden;
}
.js-hide {
@extend %js-hidden;
}

View file

@ -1,3 +0,0 @@
<div class="hidden {{modifier_class}}">
This content is hidden.
</div>

View file

@ -14,12 +14,3 @@
// Remove background highlighting from <mark> in normalize.
background-color: transparent;
}
//
// Drupal selectors. (In case a module doesn't use theme_mark().)
//
.new,
.update {
@extend %highlight-mark;
}

View file

@ -22,15 +22,3 @@
}
}
}
//
// Drupal selectors.
//
.inline.links {
@extend %inline-links;
li {
@extend %inline-links__item;
}
}

View file

@ -31,25 +31,3 @@
display: inline;
}
}
//
// Drupal selectors.
//
// Drupal core.
.field-label-inline {
.field-label {
@extend %inline-sibling;
}
// Revert core's ridiculous styling without polluting the component.
.field-label,
.field-items {
float: none;
}
}
// The inline field label used by the Fences 7.x-1.x module.
span.field-label {
@extend %inline-sibling;
}

View file

@ -16,17 +16,3 @@
display: none;
}
}
//
// Drupal selectors.
//
// Hide Drupal nav elements.
.toolbar,
.action-links,
.links,
.book-navigation,
.forum-topic-navigation,
.feed-icons {
@extend %print-none;
}

View file

@ -34,12 +34,3 @@
padding-bottom: (3/4)*100%; // 4:3 aspect ratio
}
}
//
// Drupal selectors.
//
.media-youtube-video,
.media-vimeo-preview-wrapper {
@extend %responsive-video;
}

View file

@ -26,16 +26,3 @@
}
}
}
//
// Drupal selectors.
//
.element-invisible {
@extend %visually-hidden;
}
.element-focusable {
@extend %visually-hidden;
@extend %visually-hidden--focusable;
}

View file

@ -20,14 +20,20 @@ $with-wireframes: false !default;
}
//
// Drupal selectors.
// Zen selectors.
//
.header,
.layout-3col > div,
.footer,
.region-bottom {
@extend %wireframe;
.layout {
&__header,
&__footer,
&__content,
&__navigation,
&__first-sidebar,
&__second-sidebar,
&__page-top,
&__page-bottom {
@extend %wireframe;
}
}
}