Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing some issues with lists and adding more control using lists. mo…

…ving helpers to the bottom as suggested by boilerplate.
  • Loading branch information...
commit 4cc8815b42730debce0b3c587bcfff3aa618ec26 1 parent cee1768
@heygrady authored
View
10 stylesheets/_html5-boilerplate.scss
@@ -7,11 +7,19 @@
//
// Detailed information about this CSS: h5bp.com/css
+@function in-list($list, $value) {
+ @each $item in $list {
+ @if $item == $value {
+ @return true;
+ }
+ }
+ @return false;
+};
+
@import "html5-boilerplate/normalize";
@import "html5-boilerplate/helpers";
@import "html5-boilerplate/print";
@mixin html5-boilerplate {
@include html5-boilerplate-normalize;
- @include html5-boilerplate-helpers;
}
View
12 stylesheets/html5-boilerplate/_helpers.scss
@@ -2,12 +2,12 @@
// Please define your styles before this section.
// ==========================================================================
-@mixin html5-boilerplate-helpers {
- .ir { @include image-replacement; }
- .hidden { @include hidden; }
- .visuallyhidden { @include visuallyhidden; }
- .invisible { @include invisible; }
- .clearfix { @include h5bp-clearfix; }
+@mixin html5-boilerplate-helpers($list: false) {
+ @if not($list) or in-list($list, ir) { .ir { @include image-replacement; } }
+ @if not($list) or in-list($list, hidden) { .hidden { @include hidden; } }
+ @if not($list) or in-list($list, visuallyhidden) { .visuallyhidden { @include visuallyhidden; } }
+ @if not($list) or in-list($list, invisible) { .invisible { @include invisible; } }
+ @if not($list) or in-list($list, clearfix) { .clearfix { @include h5bp-clearfix; } }
}
//For image replacement
View
33 stylesheets/html5-boilerplate/_normalize.scss
@@ -1,27 +1,18 @@
// ==|== normalize =======================================================
-@mixin html5-boilerplate-normalize {
- @include h5bp-normalize-html5;
- @include h5bp-normalize-base;
- @include h5bp-normalize-selection;
- @include h5bp-normalize-links;
- @include h5bp-normalize-typography;
- @include h5bp-normalize-lists;
- @include h5bp-normalize-images;
- @include h5bp-normalize-svg;
- @include h5bp-normalize-figures;
- @include h5bp-normalize-forms;
- @include h5bp-normalize-tables;
+@mixin html5-boilerplate-normalize($list: false) {
+ @if not($list) or in-list($list, html5) { @include h5bp-normalize-html5; }
+ @if not($list) or in-list($list, base) { @include h5bp-normalize-base; }
+ @if not($list) or in-list($list, selection) { @include h5bp-normalize-selection; }
+ @if not($list) or in-list($list, links) { @include h5bp-normalize-links; }
+ @if not($list) or in-list($list, typography) { @include h5bp-normalize-typography; }
+ @if not($list) or in-list($list, lists) { @include h5bp-normalize-lists; }
+ @if not($list) or in-list($list, images) { @include h5bp-normalize-images; }
+ @if not($list) or in-list($list, svg) { @include h5bp-normalize-svg; }
+ @if not($list) or in-list($list, figures) { @include h5bp-normalize-figures; }
+ @if not($list) or in-list($list, forms) { @include h5bp-normalize-forms; }
+ @if not($list) or in-list($list, tables) { @include h5bp-normalize-tables; }
}
-@function in-list($list, $value) {
- @each $item in $list {
- @if $item == $value {
- @return true;
- }
- }
- @return false;
-};
-
// =============================================================================
// HTML5 display definitions
// =============================================================================
View
36 stylesheets/html5-boilerplate/_print.scss
@@ -3,19 +3,27 @@
// Inlined to avoid required HTTP connection: h5bp.com/r
// ========================================================================== */
-@mixin html5-boilerplate-print {
- @media print {
- * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
- a, a:visited { text-decoration: underline; }
- a[href]:after { content: " (" attr(href) ")"; }
- abbr[title]:after { content: " (" attr(title) ")"; }
- .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
- pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
- thead { display: table-header-group; } /* h5bp.com/t */
- tr, img { page-break-inside: avoid; }
- img { max-width: 100% !important; }
- @page { margin: 0.5cm; }
- p, h2, h3 { orphans: 3; widows: 3; }
- h2, h3 { page-break-after: avoid; }
+@mixin html5-boilerplate-print($media: true) {
+ @if $media {
+ @media print {
+ @include h5bp-print;
+ }
+ } @else {
+ @include h5bp-print;
}
}
+
+@mixin h5bp-print {
+ * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } // Black prints faster: h5bp.com/s
+ a, a:visited { text-decoration: underline; }
+ a[href]:after { content: " (" attr(href) ")"; }
+ abbr[title]:after { content: " (" attr(title) ")"; }
+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } //Don't show links for images, or javascript/internal links
+ pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
+ thead { display: table-header-group; } // h5bp.com/t
+ tr, img { page-break-inside: avoid; }
+ img { max-width: 100% !important; }
+ @page { margin: 0.5cm; }
+ p, h2, h3 { orphans: 3; widows: 3; }
+ h2, h3 { page-break-after: avoid; }
+}
View
5 templates/project/partials/_media.scss
@@ -20,8 +20,9 @@
// Print styles.
// Inlined to avoid required HTTP connection: h5bp.com/r
// ========================================================================== */
-@include html5-boilerplate-print;
+
@media print {
- /* Style adjustments for print go here */
+ @include html5-boilerplate-print(false);
+ /* Style adjustments for print go here */
}
View
9 templates/project/partials/_overrides.scss
@@ -19,7 +19,7 @@
// =============================================================================
// Typography
// =============================================================================
-@include h5bp-normalize-typography( list(
+@include h5bp-normalize-typography((
abbr,
bold,
blockquote,
@@ -32,7 +32,7 @@
quotes,
small,
subsup
-) );
+));
// =============================================================================
// Lists
@@ -59,8 +59,3 @@
// Tables
// =============================================================================
@include h5bp-normalize-tables;
-
-// ==|== non-semantic helper classes ========================================
-// Please define your styles before this section.
-// ==========================================================================
-@include html5-boilerplate-helpers;
View
29 templates/project/style.scss
@@ -5,13 +5,25 @@
@import "html5-boilerplate";
// Now, you can simply include everything
-// (except media) by uncommeting this line
+// (except print and helpers) by uncommeting this line
//@include html5-boilerplate;
// Or, you can pick and choose only the sections
-// you want by using the these includes
-@include html5-boilerplate-normalize;
-@include html5-boilerplate-helpers;
+// you want by using the this include
+@include html5-boilerplate-normalize((
+ html5,
+ base,
+ selection,
+ links,
+ typography,
+ lists,
+ images,
+ svg,
+ figures,
+ forms,
+ tables
+));
+
// Or, you can import the "overrides" partial if
// you want more control over individual mixins
@@ -22,5 +34,14 @@
@import "partials/fonts";
@import "partials/page";
+// Helpers classes should come second-to-last
+@include html5-boilerplate-helpers((
+ ir,
+ hidden,
+ visuallyhidden,
+ invisible,
+ clearfix
+));
+
// Media should come last
@import "partials/media";
Please sign in to comment.
Something went wrong with that request. Please try again.