mirror of
https://github.com/danog/sass-site.git
synced 2024-11-27 04:24:50 +01:00
Separate out HTML5 Boilerplate styles and reformat CSS a little.
This commit is contained in:
parent
f2a8a87820
commit
1314aad37c
@ -1,57 +0,0 @@
|
||||
@media print {
|
||||
* {
|
||||
background: transparent !important;
|
||||
box-shadow: none !important;
|
||||
color: black !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
a {
|
||||
&,
|
||||
&:visited {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&[href]:after {
|
||||
content: " (" attr(href) ")";
|
||||
}
|
||||
|
||||
.ir &,
|
||||
&[href^="javascript:"],
|
||||
&[href^="#"] {
|
||||
&:after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
border: 1px solid #999999;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
@ -1,11 +1,8 @@
|
||||
form,
|
||||
fieldset {
|
||||
form {
|
||||
@extend %reset-margin;
|
||||
@extend %reset-padding;
|
||||
}
|
||||
|
||||
fieldset { @extend %reset-border; }
|
||||
|
||||
label {
|
||||
@extend %bold-elements;
|
||||
@include padding-leader;
|
||||
|
@ -2,19 +2,13 @@ img {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
hr {
|
||||
$new-spacing: ($base-line-height - 1) / $base-line-height;
|
||||
@include leader($new-spacing);
|
||||
@include trailer($new-spacing);
|
||||
display: block;
|
||||
padding: 0;
|
||||
height: 1px;
|
||||
border: 0 {
|
||||
top: 1px solid $color-border;
|
||||
}
|
||||
border-top-color: $color-border;
|
||||
}
|
||||
|
||||
figure {
|
||||
|
@ -27,14 +27,10 @@ html {
|
||||
|
||||
body { background: none; }
|
||||
|
||||
@mixin theme-selection {
|
||||
background: $color-background-shade;
|
||||
text-shadow: none;
|
||||
}
|
||||
@mixin theme-selection { background: $color-background-shade; }
|
||||
|
||||
// These have to be separate.
|
||||
::-moz-selection { @include theme-selection; }
|
||||
::selection { @include theme-selection; }
|
||||
::selection { @include theme-selection; }
|
||||
|
||||
|
||||
|
||||
|
@ -2,75 +2,116 @@
|
||||
* by Team Sass Design (@teamsassdesign)
|
||||
*/
|
||||
|
||||
@import "compass";
|
||||
@import "compass/layout";
|
||||
@import "susy";
|
||||
@import "breakpoint";
|
||||
@import "normalize-rails";
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// VENDOR LIBRARIES
|
||||
|
||||
@import
|
||||
"compass"
|
||||
, "compass/layout"
|
||||
, "susy"
|
||||
, "breakpoint"
|
||||
;
|
||||
|
||||
|
||||
|
||||
@import "dependencies/layout";
|
||||
@import "dependencies/typography";
|
||||
@import "dependencies/color";
|
||||
@import "dependencies/animations";
|
||||
// ---------------------------------------------------------------------------
|
||||
// DEPENDENCIES
|
||||
|
||||
@import
|
||||
"dependencies/layout"
|
||||
, "dependencies/typography"
|
||||
, "dependencies/color"
|
||||
, "dependencies/animations"
|
||||
;
|
||||
|
||||
|
||||
|
||||
@import "foundation/site";
|
||||
@import "foundation/block";
|
||||
@import "foundation/inline";
|
||||
@import "foundation/headings";
|
||||
@import "foundation/lists";
|
||||
@import "foundation/tables";
|
||||
@import "foundation/forms";
|
||||
@import "foundation/code";
|
||||
@import "foundation/media";
|
||||
// ---------------------------------------------------------------------------
|
||||
// FOUNDATION
|
||||
|
||||
@import
|
||||
"normalize-rails"
|
||||
, "vendor/html5boilerplate/base"
|
||||
, "foundation/site"
|
||||
, "foundation/block"
|
||||
, "foundation/inline"
|
||||
, "foundation/headings"
|
||||
, "foundation/lists"
|
||||
, "foundation/tables"
|
||||
, "foundation/forms"
|
||||
, "foundation/code"
|
||||
, "foundation/media"
|
||||
;
|
||||
|
||||
|
||||
|
||||
@import "vendor/jquery-ui-1.10.4.custom";
|
||||
@import "components/pop-stripe";
|
||||
@import "components/type";
|
||||
@import "components/page-header";
|
||||
@import "components/lists";
|
||||
@import "components/tables";
|
||||
@import "components/forms";
|
||||
@import "components/buttons";
|
||||
@import "components/code";
|
||||
@import "components/alerts";
|
||||
@import "components/progress";
|
||||
@import "components/articles";
|
||||
@import "components/hero-image";
|
||||
@import "components/header-image";
|
||||
@import "components/get-started";
|
||||
@import "components/slides";
|
||||
@import "components/icons";
|
||||
@import "components/logos";
|
||||
@import "components/sass-syntax-switcher";
|
||||
// ---------------------------------------------------------------------------
|
||||
// COMPONENTS
|
||||
|
||||
@import
|
||||
"vendor/html5boilerplate/browsehappy"
|
||||
, "vendor/jquery-ui-1.10.4.custom"
|
||||
, "components/pop-stripe"
|
||||
, "components/type"
|
||||
, "components/page-header"
|
||||
, "components/lists"
|
||||
, "components/tables"
|
||||
, "components/forms"
|
||||
, "components/buttons"
|
||||
, "components/code"
|
||||
, "components/alerts"
|
||||
, "components/progress"
|
||||
, "components/articles"
|
||||
, "components/hero-image"
|
||||
, "components/header-image"
|
||||
, "components/get-started"
|
||||
, "components/slides"
|
||||
, "components/icons"
|
||||
, "components/logos"
|
||||
, "components/sass-syntax-switcher"
|
||||
;
|
||||
|
||||
|
||||
|
||||
@import "regions/page";
|
||||
@import "regions/banner";
|
||||
@import "regions/navigation";
|
||||
@import "regions/content";
|
||||
@import "regions/content-primary";
|
||||
@import "regions/content-secondary";
|
||||
@import "regions/main";
|
||||
@import "regions/complementary";
|
||||
@import "regions/section-bottom";
|
||||
@import "regions/contentinfo";
|
||||
// ---------------------------------------------------------------------------
|
||||
// REGIONS
|
||||
|
||||
@import
|
||||
"regions/page"
|
||||
, "regions/banner"
|
||||
, "regions/navigation"
|
||||
, "regions/content"
|
||||
, "regions/content-primary"
|
||||
, "regions/content-secondary"
|
||||
, "regions/main"
|
||||
, "regions/complementary"
|
||||
, "regions/section-bottom"
|
||||
, "regions/contentinfo"
|
||||
;
|
||||
|
||||
|
||||
|
||||
@import "helpers/grid";
|
||||
@import "helpers/helpers";
|
||||
// ---------------------------------------------------------------------------
|
||||
// HELPERS
|
||||
|
||||
@import
|
||||
"vendor/html5boilerplate/helpers"
|
||||
, "helpers/grid"
|
||||
, "helpers/helpers"
|
||||
;
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// PAGES
|
||||
|
||||
@import "styleguide/guide";
|
||||
|
||||
|
||||
|
||||
@import "print";
|
||||
// ---------------------------------------------------------------------------
|
||||
// RESPONSIVE
|
||||
|
||||
@import "vendor/html5boilerplate/print";
|
||||
|
77
source/assets/css/vendor/html5boilerplate/_base.scss
vendored
Normal file
77
source/assets/css/vendor/html5boilerplate/_base.scss
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
|
||||
|
||||
/*
|
||||
* What follows is the result of much research on cross-browser styling.
|
||||
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
|
||||
* Kroc Camen, and the H5BP dev community and team.
|
||||
*/
|
||||
|
||||
/* ==========================================================================
|
||||
Base styles: opinionated defaults
|
||||
========================================================================== */
|
||||
|
||||
html {
|
||||
color: #222;
|
||||
font-size: 1em;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove text-shadow in selection highlight: h5bp.com/i
|
||||
* These selection rule sets have to be separate.
|
||||
* Customize the background color to match your design.
|
||||
*/
|
||||
|
||||
::-moz-selection {
|
||||
background: #b3d4fc;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: #b3d4fc;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* A better looking default horizontal rule
|
||||
*/
|
||||
|
||||
hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
margin: 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove the gap between images, videos, audio and canvas and the bottom of
|
||||
* their containers: h5bp.com/i/440
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
img,
|
||||
svg,
|
||||
video {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove default fieldset styles.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow only vertical resizing of textareas.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
10
source/assets/css/vendor/html5boilerplate/_browsehappy.scss
vendored
Normal file
10
source/assets/css/vendor/html5boilerplate/_browsehappy.scss
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
/* ==========================================================================
|
||||
Browse Happy prompt
|
||||
========================================================================== */
|
||||
|
||||
.browsehappy {
|
||||
margin: 0.2em 0;
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
padding: 0.2em 0;
|
||||
}
|
72
source/assets/css/vendor/html5boilerplate/_helpers.scss
vendored
Normal file
72
source/assets/css/vendor/html5boilerplate/_helpers.scss
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
/* ==========================================================================
|
||||
Helper classes
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers: h5bp.com/u
|
||||
*/
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide only visually, but have it available for screen readers: h5bp.com/v
|
||||
*/
|
||||
|
||||
.visuallyhidden {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extends the .visuallyhidden class to allow the element to be focusable
|
||||
* when navigated to via the keyboard: h5bp.com/p
|
||||
*/
|
||||
|
||||
.visuallyhidden.focusable:active,
|
||||
.visuallyhidden.focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers, but maintain layout
|
||||
*/
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clearfix: contain floats
|
||||
*
|
||||
* For modern browsers
|
||||
* 1. The space content is one way to avoid an Opera bug when the
|
||||
* `contenteditable` attribute is included anywhere else in the document.
|
||||
* Otherwise it causes space to appear at the top and bottom of elements
|
||||
* that receive the `clearfix` class.
|
||||
* 2. The use of `table` rather than `block` is only necessary if using
|
||||
* `:before` to contain the top-margins of child elements.
|
||||
*/
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " "; /* 1 */
|
||||
display: table; /* 2 */
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
67
source/assets/css/vendor/html5boilerplate/_print.scss
vendored
Normal file
67
source/assets/css/vendor/html5boilerplate/_print.scss
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
/* ==========================================================================
|
||||
Print styles.
|
||||
Inlined to avoid the additional HTTP request: h5bp.com/r
|
||||
========================================================================== */
|
||||
|
||||
@media print {
|
||||
* {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster: h5bp.com/s */
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a[href]:after {
|
||||
content: " (" attr(href) ")";
|
||||
}
|
||||
|
||||
abbr[title]:after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't show links that are fragment identifiers,
|
||||
* or use the `javascript:` pseudo protocol
|
||||
*/
|
||||
|
||||
a[href^="#"]:after,
|
||||
a[href^="javascript:"]:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
16
source/assets/css/vendor/html5boilerplate/_responsive.scss
vendored
Normal file
16
source/assets/css/vendor/html5boilerplate/_responsive.scss
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/* ==========================================================================
|
||||
EXAMPLE Media Queries for Responsive Design.
|
||||
These examples override the primary ('mobile first') styles.
|
||||
Modify as content requires.
|
||||
========================================================================== */
|
||||
|
||||
@media only screen and (min-width: 35em) {
|
||||
/* Style adjustments for viewports that meet the condition */
|
||||
}
|
||||
|
||||
@media print,
|
||||
(-o-min-device-pixel-ratio: 5/4),
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
/* Style adjustments for high resolution devices */
|
||||
}
|
Loading…
Reference in New Issue
Block a user