First pass at cleaning out the CSS cruft

- Dump unused styles
- Use breakpoint mixin for media queries
This commit is contained in:
Michael Rose 2016-03-09 22:19:11 -05:00
parent d84f35c0e1
commit 3b1cefde27
30 changed files with 1824 additions and 918 deletions

View file

@ -1,137 +0,0 @@
/* ==========================================================================
Coderay syntax highlighting
========================================================================== */
.CodeRay {
background-color: #efefef;
font-family: $code-font;
@include font(12);
color: #333332;
margin-bottom: 1.5em;
@include rounded(4px);
pre {
margin: 0px;
padding: 1em;
}
}
div.CodeRay { }
span.CodeRay { white-space: pre; border: 0px; padding: 2px }
table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
table.CodeRay td {
padding: 1em 0.5em;
vertical-align: top;
}
.CodeRay .line-numbers, .CodeRay .no {
background-color: #ECECEC;
color: #AAA;
text-align: right;
}
.CodeRay .line-numbers a {
color: #AAA;
}
.CodeRay .line-numbers tt { font-weight: bold }
.CodeRay .line-numbers .highlighted { color: red }
.CodeRay .line { display: block; float: left; width: 100%; }
.CodeRay span.line-numbers { padding: 0 24px 0 4px }
.CodeRay .code { width: 100% }
ol.CodeRay { font-size: 10pt }
ol.CodeRay li { white-space: pre }
.CodeRay .code pre { overflow: auto }
.CodeRay .debug { color:white ! important; background:blue ! important; }
.CodeRay .annotation { color:#007 }
.CodeRay .attribute-name { color:#f08 }
.CodeRay .attribute-value { color:#700 }
.CodeRay .binary { color:#509; font-weight:bold }
.CodeRay .comment { color:#998; font-style: italic;}
.CodeRay .char { color:#04D }
.CodeRay .char .content { color:#04D }
.CodeRay .char .delimiter { color:#039 }
.CodeRay .class { color:#458; font-weight:bold }
.CodeRay .complex { color:#A08; font-weight:bold }
.CodeRay .constant { color:teal; }
.CodeRay .color { color:#0A0 }
.CodeRay .class-variable { color:#369 }
.CodeRay .decorator { color:#B0B; }
.CodeRay .definition { color:#099; font-weight:bold }
.CodeRay .directive { color:#088; font-weight:bold }
.CodeRay .delimiter { color:black }
.CodeRay .doc { color:#970 }
.CodeRay .doctype { color:#34b }
.CodeRay .doc-string { color:#D42; font-weight:bold }
.CodeRay .escape { color:#666; font-weight:bold }
.CodeRay .entity { color:#800; font-weight:bold }
.CodeRay .error { color:#F00; background-color:#FAA }
.CodeRay .exception { color:#C00; font-weight:bold }
.CodeRay .filename { color:#099; }
.CodeRay .function { color:#900; font-weight:bold }
.CodeRay .global-variable { color:teal; font-weight:bold }
.CodeRay .hex { color:#058; font-weight:bold }
.CodeRay .integer { color:#099; }
.CodeRay .include { color:#B44; font-weight:bold }
.CodeRay .inline { color: black }
.CodeRay .inline .inline { background: #ccc }
.CodeRay .inline .inline .inline { background: #bbb }
.CodeRay .inline .inline-delimiter { color: #D14; }
.CodeRay .inline-delimiter { color: #D14; }
.CodeRay .important { color:#f00; }
.CodeRay .interpreted { color:#B2B; font-weight:bold }
.CodeRay .instance-variable { color:teal }
.CodeRay .label { color:#970; font-weight:bold }
.CodeRay .local-variable { color:#963 }
.CodeRay .octal { color:#40E; font-weight:bold }
.CodeRay .operator { }
.CodeRay .predefined-constant { font-weight:bold }
.CodeRay .predefined { color:#369; font-weight:bold }
.CodeRay .preprocessor { color:#579; }
.CodeRay .pseudo-class { color:#00C; font-weight:bold }
.CodeRay .predefined-type { color:#074; font-weight:bold }
.CodeRay .reserved, .keyword { color:#000; font-weight:bold }
.CodeRay .key { color: #808; }
.CodeRay .key .delimiter { color: #606; }
.CodeRay .key .char { color: #80f; }
.CodeRay .value { color: #088; }
.CodeRay .regexp { background-color:#fff0ff }
.CodeRay .regexp .content { color:#808 }
.CodeRay .regexp .delimiter { color:#404 }
.CodeRay .regexp .modifier { color:#C2C }
.CodeRay .regexp .function { color:#404; font-weight: bold }
.CodeRay .string { color: #D20; }
.CodeRay .string .string { }
.CodeRay .string .string .string { background-color:#ffd0d0 }
.CodeRay .string .content { color: #D14; }
.CodeRay .string .char { color: #D14; }
.CodeRay .string .delimiter { color: #D14; }
.CodeRay .shell { color:#D14 }
.CodeRay .shell .content { }
.CodeRay .shell .delimiter { color:#D14 }
.CodeRay .symbol { color:#990073 }
.CodeRay .symbol .content { color:#A60 }
.CodeRay .symbol .delimiter { color:#630 }
.CodeRay .tag { color:#070 }
.CodeRay .tag-special { color:#D70; font-weight:bold }
.CodeRay .type { color:#339; font-weight:bold }
.CodeRay .variable { color:#036 }
.CodeRay .insert { background: #afa; }
.CodeRay .delete { background: #faa; }
.CodeRay .change { color: #aaf; background: #007; }
.CodeRay .head { color: #f8f; background: #505 }
.CodeRay .insert .insert { color: #080; font-weight:bold }
.CodeRay .delete .delete { color: #800; font-weight:bold }
.CodeRay .change .change { color: #66f; }
.CodeRay .head .head { color: #f4f; }

View file

@ -37,7 +37,7 @@ svg:not(:root) {
.half {
@include container;
@include clearfix;
@media #{$micro} {
@include breakpoint($micro) {
img {
@include grid(12,6);
}
@ -52,7 +52,7 @@ svg:not(:root) {
.third {
@include container;
@include clearfix;
@media #{$micro} {
@include breakpoint($micro) {
img {
@include grid(12,4);
}
@ -73,7 +73,7 @@ svg:not(:root) {
margin-bottom: 20px;
padding: 8px 20px;
@include font-rem(14);
font-family: $heading-font;
font-family: $sans-serif-narrow;
font-weight: 700;
background-color: $primary;
color: $white;

View file

@ -44,7 +44,7 @@ input,
button,
select,
textarea {
font-family: $base-font;
font-family: $serif;
@include box-sizing(border-box);
}
label {

View file

@ -4,7 +4,7 @@
body {
background-color: $bodycolor;
font-family: $base-font;
font-family: $serif;
color: $text-color;
}
@ -15,7 +15,7 @@ body {
.navigation-wrapper {
@include container;
padding: 2em 0 1em;
font-family: $heading-font;
font-family: $sans-serif-narrow;
font-weight: 700;
text-transform: uppercase;
@include clearfix;
@ -30,13 +30,13 @@ body {
float: none;
display: block;
@include font-rem(24);
@media #{$small} {
@include breakpoint($small) {
@include grid(12,2);
@include prefix(12,0.5);
@include suffix(12,0.5);
@include font-rem(16);
}
@media #{$x-large} {
@include breakpoint($x-large) {
@include grid(12,1.5);
@include prefix(12,2);
}
@ -50,12 +50,12 @@ body {
margin-bottom: 1em;
float: none;
display: block;
@media #{$small} {
@include breakpoint($small) {
@include grid(12,9);
@include prefix(12,0);
@include suffix(12,0);
}
@media #{$x-large} {
@include breakpoint($x-large) {
@include grid(12,8);
}
ul {
@ -73,7 +73,7 @@ body {
&:last-child {
border-bottom: 0 solid transparent;
}
@media #{$small} {
@include breakpoint($small) {
display: inline;
margin-right: 25px;
white-space: nowrap;
@ -85,7 +85,7 @@ body {
decoration: none;
border-bottom: 0 solid transparent;
@include transition(all .2s);
@media #{$small} {
@include breakpoint($small) {
display: inline;
padding: 0;
}
@ -93,129 +93,6 @@ body {
}
}
/* Animated lines for mobile nav button */
$button-size: 1.5rem;
@mixin navicon-line() {
display: inline-block;
width: $button-size;
height: $button-size/7;
// line color
background: $white;
border-radius: $button-size/14;
transition: .3s;
}
.navicon-lines-button {
padding: $button-size/4 $button-size/2;
transition: .3s;
cursor: pointer;
user-select: none;
border-radius: $button-size/7;
}
.navicon-lines-button:hover {
opacity: 1;
}
.navicon-lines-button:active {
transition: 0;
}
.navicon-lines {
margin-right: 10px;
margin-bottom: $button-size/5;
// create middle line
@include navicon-line;
position: relative;
// create the upper and lower lines as pseudo-elements of the middle line
&:before,
&:after {
@include navicon-line;
position: absolute;
left: 0;
content: '';
-webkit-transform-origin: $button-size/14 center;
transform-origin: $button-size/14 center;
}
&:before { top: $button-size/4; }
&:after { top: -$button-size/4; }
}
.navicon-lines-button:hover {
opacity: 1;
.navicon-lines {
&:before { top: $button-size/3.5; }
&:after { top: -$button-size/3.5; }
}
}
.navicon-lines-button.x.active .navicon-lines {
// hide the middle line
background: transparent;
// overlap the lines by setting both their top values to 0
&:before,
&:after {
-webkit-transform-origin: 50% 50%;
transform-origin: 50% 50%;
top: 0;
width: $button-size;
}
// rotate the lines to form the x shape
&:before {
-webkit-transform: rotate3d(0,0,1,45deg);
transform: rotate3d(0,0,1,45deg);
}
&:after {
-webkit-transform: rotate3d(0,0,1,-45deg);
transform: rotate3d(0,0,1,-45deg);
}
}
// Style the toggle menu link and hide it
.nav .navtoggle {
@include font-rem(18);
font-weight: normal;
background-color: $black;
color: $white;
border: none;
cursor: pointer;
@media #{$small} {
display: none;
}
}
.nav button {
border: none;
background: none;
}
.navtoggle i {
z-index:-1;
}
.icon-menu {
position: relative;
top: 3px;
line-height: 0;
}
// When JavaScript is disabled, we hide the toggle button
.no-js .nav .navtoggle {
display: none;
}
// When JavaScript is disabled, we show the menu
.no-js .nav ul {
max-height: 30em;
overflow: hidden;
}
// When JavaScript is enabled, we hide the menu
.js .nav ul {
max-height: 0;
overflow: hidden;
@media #{$small} {
max-height: 30em;
}
}
// Displaying the menu when the user has clicked on the button
.js .nav .active + ul {
max-height: 30em;
overflow: hidden;
-webkit-transition: max-height .4s;
-moz-transition: max-height .4s;
-o-transition: max-height .4s;
-ms-transition: max-height .4s;
transition: max-height .4s;
}
/* Main content */
#main {
counter-reset: captions;
@ -232,15 +109,15 @@ $button-size: 1.5rem;
@include prefix(12,1);
@include suffix(12,1);
margin-bottom: 2em;
@media #{$small} {
@include breakpoint($small) {
@include grid(12,8);
@include prefix(12,0);
@include suffix(12,0);
}
@media #{$large} {
@include breakpoint($large) {
@include grid(12,6);
}
@media #{$x-large} {
@include breakpoint($x-large) {
@include grid(12,5);
}
}
@ -259,15 +136,15 @@ $button-size: 1.5rem;
@include prefix(12,1);
@include suffix(12,1);
margin-bottom: 2em;
@media #{$small} {
@include breakpoint($small) {
@include grid(12,8);
@include prefix(12,0);
@include suffix(12,0);
}
@media #{$large} {
@include breakpoint($large) {
@include grid(12,6);
}
@media #{$x-large} {
@include breakpoint($x-large) {
@include grid(12,5);
}
h3 {
@ -309,13 +186,13 @@ $button-size: 1.5rem;
height: 0;
border: 10px solid transparent;
border-bottom-color: $bodycolor;
@media #{$small} {
@include breakpoint($small) {
left: 25%;
}
@media #{$large} {
@include breakpoint($large) {
border-width: 20px;
}
@media #{$x-large} {
@include breakpoint($x-large) {
left: 33.333333333%;
}
}
@ -341,20 +218,20 @@ $button-size: 1.5rem;
img {
width: 100%;
}
@media #{$small} {
@include breakpoint($small) {
display: block;
@include grid(12,2);
@include prefix(12,0.5);
@include suffix(12,0.5);
}
@media #{$x-large} {
@include breakpoint($x-large) {
@include grid(12,1.5);
@include prefix(12,2);
}
}
.author-name {
margin-bottom: 0;
@media #{$small} {
@include breakpoint($small) {
margin-top: 10px;
margin-bottom: 10px;
}
@ -362,7 +239,7 @@ $button-size: 1.5rem;
.author-bio {
font-size: 80%;
font-style: italic;
@media #{$small} {
@include breakpoint($small) {
margin-bottom: 20px;
}
}
@ -388,11 +265,11 @@ $button-size: 1.5rem;
margin-right: 5px;
}
}
@media #{$small} {
@include breakpoint($small) {
display: block;
max-width: 125px;
}
@media #{$large} {
@include breakpoint($large) {
.author-name,
.author-avatar,
.author-bio,
@ -415,7 +292,7 @@ $button-size: 1.5rem;
/* Table of contents */
.toc {
font-size: 95%;
@media #{$large} {
@include breakpoint($large) {
display: block;
@include grid(12,2);
@include prefix(12,0.5);
@ -447,7 +324,7 @@ $button-size: 1.5rem;
display: block;
margin: 0 0 1px 0;
padding: 0;
font-family: $heading-font;
font-family: $sans-serif-narrow;
list-style-type: none;
&:last-child {
border-bottom-width: 0;
@ -490,16 +367,16 @@ $button-size: 1.5rem;
padding: 0;
li {
@include grid(12,6);
@media #{$micro} {
@include breakpoint($micro) {
width: 33.333333%;
}
@media #{$small} {
@include breakpoint($small) {
width: 25%;
}
@media #{$medium} {
@include breakpoint($medium) {
width: 20%;
}
@media #{$large} {
@include breakpoint($large) {
width: 16.666666666%;
}
}
@ -562,7 +439,7 @@ $button-size: 1.5rem;
text-decoration: none !important;
text-transform: uppercase;
@include font-rem(14);
font-family: $heading-font;
font-family: $sans-serif-narrow;
font-weight: 700;
color: $white;
opacity: 0.8;
@ -572,7 +449,7 @@ $button-size: 1.5rem;
}
span {
display: none;
@media #{$medium} {
@include breakpoint($medium) {
display: inline;
padding-left: 5px;
}
@ -598,12 +475,12 @@ $button-size: 1.5rem;
@include grid(12,10);
@include prefix(12,1);
@include suffix(12,1);
@media #{$small} {
@include breakpoint($small) {
@include grid(12,6);
@include prefix(12,3);
@include suffix(12,3);
}
@media #{$x-large} {
@include breakpoint($x-large) {
@include grid(12,4.5);
@include prefix(12,4);
@include suffix(12,3.5);
@ -633,12 +510,12 @@ $button-size: 1.5rem;
@include prefix(12,1);
@include suffix(12,1);
margin-bottom: 2em;
@media #{$small} {
@include breakpoint($small) {
@include grid(12,6);
@include prefix(12,3);
@include suffix(12,3);
}
@media #{$x-large} {
@include breakpoint($x-large) {
@include grid(12,4.5);
@include prefix(12,4);
@include suffix(12,3.5);

View file

@ -2,83 +2,93 @@
Syntax highlighting
========================================================================== */
pre.highlight {
div.highlighter-rouge {
margin-bottom: 1em;
padding: 1em;
}
border: 1px solid #ddd;
border-radius: $border-radius;
.highlight {
background-color: #efefef;
font-family: $code-font;
margin: 0;
font-family: $monospace;
@include font-rem(12);
line-height: 1.5;
color: #333332;
margin-bottom: 1.5em;
@include rounded(4px);
pre {
position: relative;
margin: 0;
padding: 1em;
}
.lineno { padding-right: 24px; color: lighten(#333332,50);}
.hll { background-color: #ffffcc }
.c { color: #999988; font-style: italic } /* Comment */
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
.k { color: #000000; font-weight: bold } /* Keyword */
.o { color: #000000; font-weight: bold } /* Operator */
.cm { color: #999988; font-style: italic } /* Comment.Multiline */
.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
.c1 { color: #999988; font-style: italic } /* Comment.Single */
.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.ge { color: #000000; font-style: italic } /* Generic.Emph */
.gr { color: #aa0000 } /* Generic.Error */
.gh { color: #999999 } /* Generic.Heading */
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.go { color: #888888 } /* Generic.Output */
.gp { color: #555555 } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #aaaaaa } /* Generic.Subheading */
.gt { color: #aa0000 } /* Generic.Traceback */
.kc { color: #000000; font-weight: bold } /* Keyword.Constant */
.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
.m { color: #009999 } /* Literal.Number */
.s { color: #d01040 } /* Literal.String */
.na { color: #008080 } /* Name.Attribute */
.nb { color: #0086B3 } /* Name.Builtin */
.nc { color: #445588; font-weight: bold } /* Name.Class */
.no { color: #008080 } /* Name.Constant */
.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
.ni { color: #800080 } /* Name.Entity */
.ne { color: #990000; font-weight: bold } /* Name.Exception */
.nf { color: #990000; font-weight: bold } /* Name.Function */
.nl { color: #990000; font-weight: bold } /* Name.Label */
.nn { color: #555555 } /* Name.Namespace */
.nt { color: #000080 } /* Name.Tag */
.nv { color: #008080 } /* Name.Variable */
.ow { color: #000000; font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #009999 } /* Literal.Number.Float */
.mh { color: #009999 } /* Literal.Number.Hex */
.mi { color: #009999 } /* Literal.Number.Integer */
.mo { color: #009999 } /* Literal.Number.Oct */
.sb { color: #d01040 } /* Literal.String.Backtick */
.sc { color: #d01040 } /* Literal.String.Char */
.sd { color: #d01040 } /* Literal.String.Doc */
.s2 { color: #d01040 } /* Literal.String.Double */
.se { color: #d01040 } /* Literal.String.Escape */
.sh { color: #d01040 } /* Literal.String.Heredoc */
.si { color: #d01040 } /* Literal.String.Interpol */
.sx { color: #d01040 } /* Literal.String.Other */
.sr { color: #009926 } /* Literal.String.Regex */
.s1 { color: #d01040 } /* Literal.String.Single */
.ss { color: #990073 } /* Literal.String.Symbol */
.bp { color: #999999 } /* Name.Builtin.Pseudo */
.vc { color: #008080 } /* Name.Variable.Class */
.vg { color: #008080 } /* Name.Variable.Global */
.vi { color: #008080 } /* Name.Variable.Instance */
.il { color: #009999 } /* Literal.Number.Integer.Long */
}
.highlight table td { padding: 5px; }
.highlight table pre { margin: 0; }
.highlight, .highlight .w {
color: #303030;
}
.highlight .err {
color: #151515;
background-color: #ac4142;
}
.highlight .c, .highlight .cd, .highlight .cm, .highlight .c1, .highlight .cs {
color: #505050;
}
.highlight .cp {
color: #f4bf75;
}
.highlight .nt {
color: #f4bf75;
}
.highlight .o, .highlight .ow {
color: #d0d0d0;
}
.highlight .p, .highlight .pi {
color: #d0d0d0;
}
.highlight .gi {
color: #90a959;
}
.highlight .gd {
color: #ac4142;
}
.highlight .gh {
color: #6a9fb5;
background-color: #151515;
font-weight: bold;
}
.highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv {
color: #aa759f;
}
.highlight .kc {
color: #d28445;
}
.highlight .kt {
color: #d28445;
}
.highlight .kd {
color: #d28445;
}
.highlight .s, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 {
color: #90a959;
}
.highlight .sr {
color: #75b5aa;
}
.highlight .si {
color: #8f5536;
}
.highlight .se {
color: #8f5536;
}
.highlight .nn {
color: #f4bf75;
}
.highlight .nc {
color: #f4bf75;
}
.highlight .no {
color: #f4bf75;
}
.highlight .na {
color: #6a9fb5;
}
.highlight .m, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mb, .highlight .mx {
color: #90a959;
}
.highlight .ss {
color: #90a959;
}

View file

@ -7,7 +7,7 @@
========================================================================== */
h1, h2, h3, h4, h5, h6 {
font-family: $heading-font;
font-family: $serif;
}
h1 {
@include font-size(32);
@ -65,12 +65,12 @@ a {
line-height: 1.3;
font-style: italic;
color: lighten($text-color, 30);
@media #{$small} {
@include breakpoint($small) {
@include grid(12,9);
@include prefix(12,0);
@include suffix(12,0);
}
@media #{$x-large} {
@include breakpoint($x-large) {
@include grid(12,8.5);
}
a {
@ -100,7 +100,7 @@ blockquote {
margin-left: -28px;
padding-left: 20px;
border-left: 8px solid $border-color;
font-family: $alt-font;
font-family: $serif;
font-style: italic;
}
@ -135,18 +135,13 @@ p {
========================================================================== */
tt, code, kbd, samp, pre {
font-family: $code-font;
font-family: $monospace;
}
p,
li {
code {
@include font-rem(12);
line-height: 1.5;
margin: 0 2px;
padding: 0 5px;
border: 1px solid lighten($black, 90);
background-color: #efefef;
@include rounded(3px);
}
}
pre {

View file

@ -1,5 +1,5 @@
/* ==========================================================================
Sass variables
Variables
========================================================================== */
/*
@ -9,10 +9,11 @@
$doc-font-size: 16;
$doc-line-height: 26;
$paragraph-indent: true !default;
$base-font: 'PT Serif', serif;
$heading-font: 'PT Sans Narrow', sans-serif;
$code-font: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace;
$alt-font: $base-font;
$serif : "PT Serif", serif;
$sans-serif : -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
$sans-serif-narrow : "PT Sans Narrow", sans-serif;
$monospace : Monaco, Consolas, "Lucida Console", monospace;
/*
Colors
@ -58,12 +59,16 @@ $linkcolorhover : darken($linkcolor, 10);
$linkcolorvisited : lighten($linkcolorhover, 20);
$linkcolorfocus : darken($linkcolorvisited, 10);
$border-radius : 4px;
/*
Breakpoints
========================================================================== */
$micro : "only screen and (min-width: 30em)";
$small : "only screen and (min-width: 37.5em)";
$medium : "only screen and (min-width: 48em)";
$large : "only screen and (min-width: 62em)";
$x-large : "only screen and (min-width: 86.375em)";
@include breakpoint-set("to ems", true);
$micro : 480px;
$small : 600px;
$medium : 768px;
$large : 992px;
$x-large : 1382px;

View file

@ -1,13 +1,13 @@
/*
* Minimal Mistakes Jekyll Theme
*
* Minimal Mistakes
*
* Designer: Michael Rose
* Twitter: http://twitter.com/mmistakes
* - Michael Rose
* - mademistakes.com
* - https://twitter.com/mmistakes
*
*/
// Partials
@import "vendor/breakpoint/breakpoint"; // media query mixins
@import "variables";
@import "grid";
@import "mixins";
@ -15,7 +15,6 @@
@import "site";
@import "typography";
@import "syntax";
@import "coderay";
@import "elements";
@import "forms";
@import "page";

114
_assets/css/vendor/breakpoint/_breakpoint.scss vendored Executable file
View file

@ -0,0 +1,114 @@
//////////////////////////////
// Default Variables
//////////////////////////////
$Breakpoint-Settings: (
'default media': all,
'default feature': min-width,
'default pair': width,
'force all media type': false,
'to ems': false,
'transform resolutions': true,
'no queries': false,
'no query fallbacks': false,
'base font size': 16px,
'legacy syntax': false
);
$breakpoint: () !default;
//////////////////////////////
// Imports
//////////////////////////////
@import "settings";
@import "context";
@import "helpers";
@import "parsers";
@import "no-query";
@import "respond-to";
@import "legacy-settings";
//////////////////////////////
// Breakpoint Mixin
//////////////////////////////
@mixin breakpoint($query, $no-query: false) {
@include legacy-settings-warning;
// Reset contexts
@include private-breakpoint-reset-contexts();
$breakpoint: breakpoint($query, false);
$query-string: map-get($breakpoint, 'query');
$query-fallback: map-get($breakpoint, 'fallback');
$private-breakpoint-context-holder: map-get($breakpoint, 'context holder') !global;
$private-breakpoint-query-count: map-get($breakpoint, 'query count') !global;
// Allow for an as-needed override or usage of no query fallback.
@if $no-query != false {
$query-fallback: $no-query;
}
@if $query-fallback != false {
$context-setter: private-breakpoint-set-context('no-query', $query-fallback);
}
// Print Out Query String
@if not breakpoint-get('no queries') {
@media #{$query-string} {
@content;
}
}
@if breakpoint-get('no query fallbacks') != false or breakpoint-get('no queries') == true {
$type: type-of(breakpoint-get('no query fallbacks'));
$print: false;
@if ($type == 'bool') {
$print: true;
}
@else if ($type == 'string') {
@if $query-fallback == breakpoint-get('no query fallbacks') {
$print: true;
}
}
@else if ($type == 'list') {
@each $wrapper in breakpoint-get('no query fallbacks') {
@if $query-fallback == $wrapper {
$print: true;
}
}
}
// Write Fallback
@if ($query-fallback != false) and ($print == true) {
$type-fallback: type-of($query-fallback);
@if ($type-fallback != 'bool') {
#{$query-fallback} & {
@content;
}
}
@else {
@content;
}
}
}
@include private-breakpoint-reset-contexts();
}
@mixin mq($query, $no-query: false) {
@include breakpoint($query, $no-query) {
@content;
}
}

95
_assets/css/vendor/breakpoint/_context.scss vendored Executable file
View file

@ -0,0 +1,95 @@
//////////////////////////////
// Private Breakpoint Variables
//////////////////////////////
$private-breakpoint-context-holder: ();
$private-breakpoint-query-count: 0 !default;
//////////////////////////////
// Breakpoint Has Context
// Returns whether or not you are inside a Breakpoint query
//////////////////////////////
@function breakpoint-has-context() {
@if length($private-breakpoint-query-count) {
@return true;
}
@else {
@return false;
}
}
//////////////////////////////
// Breakpoint Get Context
// $feature: Input feature to get it's current MQ context. Returns false if no context
//////////////////////////////
@function breakpoint-get-context($feature) {
@if map-has-key($private-breakpoint-context-holder, $feature) {
$get: map-get($private-breakpoint-context-holder, $feature);
// Special handling of no-query from get side so /false/ prepends aren't returned
@if $feature == 'no-query' {
@if type-of($get) == 'list' and length($get) > 1 and nth($get, 1) == false {
$get: nth($get, length($get));
}
}
@return $get;
}
@else {
@if breakpoint-has-context() and $feature == 'media' {
@return breakpoint-get('default media');
}
@else {
@return false;
}
}
}
//////////////////////////////
// Private function to set context
//////////////////////////////
@function private-breakpoint-set-context($feature, $value) {
@if $value == 'monochrome' {
$feature: 'monochrome';
}
$current: map-get($private-breakpoint-context-holder, $feature);
@if $current and length($current) == $private-breakpoint-query-count {
@warn "You have already queried against `#{$feature}`. Unexpected things may happen if you query against the same feature more than once in the same `and` query. Breakpoint is overwriting the current context with `#{$value}`";
}
@if not map-has-key($private-breakpoint-context-holder, $feature) {
$v-holder: ();
@for $i from 1 to $private-breakpoint-query-count {
@if $feature == 'media' {
$v-holder: append($v-holder, breakpoint-get('default media'));
}
@else {
$v-holder: append($v-holder, false);
}
}
$v-holder: append($v-holder, $value);
$private-breakpoint-context-holder: map-merge($private-breakpoint-context-holder, ($feature: $v-holder)) !global;
}
@else {
$v-holder: map-get($private-breakpoint-context-holder, $feature);
$length: length($v-holder);
@for $i from $length to $private-breakpoint-query-count - 1 {
@if $feature == 'media' {
$v-holder: append($v-holder, breakpoint-get('default media'));
}
@else {
$v-holder: append($v-holder, false);
}
}
$v-holder: append($v-holder, $value);
$private-breakpoint-context-holder: map-merge($private-breakpoint-context-holder, ($feature: $v-holder)) !global;
}
@return true;
}
//////////////////////////////
// Private function to reset context
//////////////////////////////
@mixin private-breakpoint-reset-contexts {
$private-breakpoint-context-holder: () !global;
$private-breakpoint-query-count: 0 !global;
}

151
_assets/css/vendor/breakpoint/_helpers.scss vendored Executable file
View file

@ -0,0 +1,151 @@
//////////////////////////////
// Converts the input value to Base EMs
//////////////////////////////
@function breakpoint-to-base-em($value) {
$value-unit: unit($value);
// Will convert relative EMs into root EMs.
@if breakpoint-get('base font size') and type-of(breakpoint-get('base font size')) == 'number' and $value-unit == 'em' {
$base-unit: unit(breakpoint-get('base font size'));
@if $base-unit == 'px' or $base-unit == '%' or $base-unit == 'em' or $base-unit == 'pt' {
@return base-conversion($value) / base-conversion(breakpoint-get('base font size')) * 1em;
}
@else {
@warn '#{breakpoint-get(\'base font size\')} is not set in valid units for font size!';
@return false;
}
}
@else {
@return base-conversion($value);
}
}
@function base-conversion($value) {
$unit: unit($value);
@if $unit == 'px' {
@return $value / 16px * 1em;
}
@else if $unit == '%' {
@return $value / 100% * 1em;
}
@else if $unit == 'em' {
@return $value;
}
@else if $unit == 'pt' {
@return $value / 12pt * 1em;
}
@else {
@return $value;
// @warn 'Everything is terrible! What have you done?!';
}
}
//////////////////////////////
// Returns whether the feature can have a min/max pair
//////////////////////////////
$breakpoint-min-max-features: 'color',
'color-index',
'aspect-ratio',
'device-aspect-ratio',
'device-height',
'device-width',
'height',
'monochrome',
'resolution',
'width';
@function breakpoint-min-max($feature) {
@each $item in $breakpoint-min-max-features {
@if $feature == $item {
@return true;
}
}
@return false;
}
//////////////////////////////
// Returns whether the feature can have a string value
//////////////////////////////
$breakpoint-string-features: 'orientation',
'scan',
'color',
'aspect-ratio',
'device-aspect-ratio',
'pointer',
'luminosity';
@function breakpoint-string-value($feature) {
@each $item in $breakpoint-string-features {
@if breakpoint-min-max($item) {
@if $feature == 'min-#{$item}' or $feature == 'max-#{$item}' {
@return true;
}
}
@else if $feature == $item {
@return true;
}
}
@return false;
}
//////////////////////////////
// Returns whether the feature is a media type
//////////////////////////////
$breakpoint-media-types: 'all',
'braille',
'embossed',
'handheld',
'print',
'projection',
'screen',
'speech',
'tty',
'tv';
@function breakpoint-is-media($feature) {
@each $media in $breakpoint-media-types {
@if ($feature == $media) or ($feature == 'not #{$media}') or ($feature == 'only #{$media}') {
@return true;
}
}
@return false;
}
//////////////////////////////
// Returns whether the feature can stand alone
//////////////////////////////
$breakpoint-single-string-features: 'color',
'color-index',
'grid',
'monochrome';
@function breakpoint-single-string($feature) {
@each $item in $breakpoint-single-string-features {
@if $feature == $item {
@return true;
}
}
@return false;
}
//////////////////////////////
// Returns whether the feature
//////////////////////////////
@function breakpoint-is-resolution($feature) {
$resolutions: 'device-pixel-ratio', 'dpr';
@if breakpoint-get('transform resolutions') {
$resolutions: append($resolutions, 'resolution');
}
@each $reso in $resolutions {
@if index($feature, $reso) or index($feature, 'min-#{$reso}') or index($feature, 'max-#{$reso}') {
@return true;
}
}
@return false;
}

View file

@ -0,0 +1,50 @@
@mixin legacy-settings-warning {
$legacyVars: (
'default-media': 'default media',
'default-feature': 'default feature',
'force-media-all': 'force all media type',
'to-ems': 'to ems',
'resolutions': 'transform resolutions',
'no-queries': 'no queries',
'no-query-fallbacks': 'no query fallbacks',
'base-font-size': 'base font size',
'legacy-syntax': 'legacy syntax'
);
@each $legacy, $new in $legacyVars {
@if global-variable-exists('breakpoint-' + $legacy) {
@warn "In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. Please change all instances of `$breakpoint-#{$legacy}: {{setting}}` to `@include breakpoint-set('#{$new}', {{setting}})`. Variable settings, as well as this warning will be deprecated in a future release."
}
};
//////////////////////////////
// Hand correct each setting
//////////////////////////////
@if global-variable-exists('breakpoint-default-media') and $breakpoint-default-media != breakpoint-get('default media') {
@include breakpoint-set('default media', $breakpoint-default-media);
}
@if global-variable-exists('breakpoint-default-feature') and $breakpoint-default-feature != breakpoint-get('default feature') {
@include breakpoint-set('default feature', $breakpoint-default-feature);
}
@if global-variable-exists('breakpoint-force-media-all') and $breakpoint-force-media-all != breakpoint-get('force all media type') {
@include breakpoint-set('force all media type', $breakpoint-force-media-all);
}
@if global-variable-exists('breakpoint-to-ems') and $breakpoint-to-ems != breakpoint-get('to ems') {
@include breakpoint-set('to ems', $breakpoint-to-ems);
}
@if global-variable-exists('breakpoint-resolutions') and $breakpoint-resolutions != breakpoint-get('transform resolutions') {
@include breakpoint-set('transform resolutions', $breakpoint-resolutions);
}
@if global-variable-exists('breakpoint-no-queries') and $breakpoint-no-queries != breakpoint-get('no queries') {
@include breakpoint-set('no queries', $breakpoint-no-queries);
}
@if global-variable-exists('breakpoint-no-query-fallbacks') and $breakpoint-no-query-fallbacks != breakpoint-get('no query fallbacks') {
@include breakpoint-set('no query fallbacks', $breakpoint-no-query-fallbacks);
}
@if global-variable-exists('breakpoint-base-font-size') and $breakpoint-base-font-size != breakpoint-get('base font size') {
@include breakpoint-set('base font size', $breakpoint-base-font-size);
}
@if global-variable-exists('breakpoint-legacy-syntax') and $breakpoint-legacy-syntax != breakpoint-get('legacy syntax') {
@include breakpoint-set('legacy syntax', $breakpoint-legacy-syntax);
}
}

15
_assets/css/vendor/breakpoint/_no-query.scss vendored Executable file
View file

@ -0,0 +1,15 @@
@function breakpoint-no-query($query) {
@if type-of($query) == 'list' {
$keyword: nth($query, 1);
@if type-of($keyword) == 'string' and ($keyword == 'no-query' or $keyword == 'no query' or $keyword == 'fallback') {
@return nth($query, 2);
}
@else {
@return false;
}
}
@else {
@return false;
}
}

215
_assets/css/vendor/breakpoint/_parsers.scss vendored Executable file
View file

@ -0,0 +1,215 @@
//////////////////////////////
// Import Parser Pieces
//////////////////////////////
@import "parsers/query";
@import "parsers/single";
@import "parsers/double";
@import "parsers/triple";
@import "parsers/resolution";
$Memo-Exists: function-exists(memo-get) and function-exists(memo-set);
//////////////////////////////
// Breakpoint Function
//////////////////////////////
@function breakpoint($query, $contexts...) {
$run: true;
$return: ();
// Grab the Memo Output if Memoization can be a thing
@if $Memo-Exists {
$return: memo-get(breakpoint, breakpoint $query $contexts);
@if $return != null {
$run: false;
}
}
@if not $Memo-Exists or $run {
// Internal Variables
$query-string: '';
$query-fallback: false;
$return: ();
// Reserve Global Private Breakpoint Context
$holder-context: $private-breakpoint-context-holder;
$holder-query-count: $private-breakpoint-query-count;
// Reset Global Private Breakpoint Context
$private-breakpoint-context-holder: () !global;
$private-breakpoint-query-count: 0 !global;
// Test to see if it's a comma-separated list
$or-list: if(list-separator($query) == 'comma', true, false);
@if ($or-list == false and breakpoint-get('legacy syntax') == false) {
$query-string: breakpoint-parse($query);
}
@else {
$length: length($query);
$last: nth($query, $length);
$query-fallback: breakpoint-no-query($last);
@if ($query-fallback != false) {
$length: $length - 1;
}
@if (breakpoint-get('legacy syntax') == true) {
$mq: ();
@for $i from 1 through $length {
$mq: append($mq, nth($query, $i), comma);
}
$query-string: breakpoint-parse($mq);
}
@else {
$query-string: '';
@for $i from 1 through $length {
$query-string: $query-string + if($i == 1, '', ', ') + breakpoint-parse(nth($query, $i));
}
}
}
$return: ('query': $query-string,
'fallback': $query-fallback,
'context holder': $private-breakpoint-context-holder,
'query count': $private-breakpoint-query-count
);
@if length($contexts) > 0 and nth($contexts, 1) != false {
@if $query-fallback != false {
$context-setter: private-breakpoint-set-context('no-query', $query-fallback);
}
$context-map: ();
@each $context in $contexts {
$context-map: map-merge($context-map, ($context: breakpoint-get-context($context)));
}
$return: map-merge($return, (context: $context-map));
}
// Reset Global Private Breakpoint Context
$private-breakpoint-context-holder: () !global;
$private-breakpoint-query-count: 0 !global;
@if $Memo-Exists {
$holder: memo-set(breakpoint, breakpoint $query $contexts, $return);
}
}
@return $return;
}
//////////////////////////////
// General Breakpoint Parser
//////////////////////////////
@function breakpoint-parse($query) {
// Increase number of 'and' queries
$private-breakpoint-query-count: $private-breakpoint-query-count + 1 !global;
// Set up Media Type
$query-print: '';
$force-all: ((breakpoint-get('force all media type') == true) and (breakpoint-get('default media') == 'all'));
$empty-media: true;
@if ($force-all == true) or (breakpoint-get('default media') != 'all') {
// Force the print of the default media type if (force all is true and default media type is all) or (default media type is not all)
$query-print: breakpoint-get('default media');
$empty-media: false;
}
$query-resolution: false;
$query-holder: breakpoint-parse-query($query);
// Loop over each parsed out query and write it to $query-print
$first: true;
@each $feature in $query-holder {
$length: length($feature);
// Parse a single feature
@if ($length == 1) {
// Feature is currently a list, grab the actual value
$feature: nth($feature, 1);
// Media Type must by convention be the first item, so it's safe to flat override $query-print, which right now should only be the default media type
@if (breakpoint-is-media($feature)) {
@if ($force-all == true) or ($feature != 'all') {
// Force the print of the default media type if (force all is true and default media type is all) or (default media type is not all)
$query-print: $feature;
$empty-media: false;
// Set Context
$context-setter: private-breakpoint-set-context(media, $query-print);
}
}
@else {
$parsed: breakpoint-parse-single($feature, $empty-media, $first);
$query-print: '#{$query-print} #{$parsed}';
$first: false;
}
}
// Parse a double feature
@else if ($length == 2) {
@if (breakpoint-is-resolution($feature) != false) {
$query-resolution: $feature;
}
@else {
$parsed: null;
// If it's a string/number pair,
// we check to see if one is a single-string value,
// then we parse it as a normal double
$alpha: nth($feature, 1);
$beta: nth($feature, 2);
@if breakpoint-single-string($alpha) or breakpoint-single-string($beta) {
$parsed: breakpoint-parse-single($alpha, $empty-media, $first);
$query-print: '#{$query-print} #{$parsed}';
$first: false;
$parsed: breakpoint-parse-single($beta, $empty-media, $first);
$query-print: '#{$query-print} #{$parsed}';
}
@else {
$parsed: breakpoint-parse-double($feature, $empty-media, $first);
$query-print: '#{$query-print} #{$parsed}';
$first: false;
}
}
}
// Parse a triple feature
@else if ($length == 3) {
$parsed: breakpoint-parse-triple($feature, $empty-media, $first);
$query-print: '#{$query-print} #{$parsed}';
$first: false;
}
}
@if ($query-resolution != false) {
$query-print: breakpoint-build-resolution($query-print, $query-resolution, $empty-media, $first);
}
// Loop through each feature that's been detected so far and append 'false' to the the value list to increment their counters
@each $f, $v in $private-breakpoint-context-holder {
$v-holder: $v;
$length: length($v-holder);
@if length($v-holder) < $private-breakpoint-query-count {
@for $i from $length to $private-breakpoint-query-count {
@if $f == 'media' {
$v-holder: append($v-holder, breakpoint-get('default media'));
}
@else {
$v-holder: append($v-holder, false);
}
}
}
$private-breakpoint-context-holder: map-merge($private-breakpoint-context-holder, ($f: $v-holder)) !global;
}
@return $query-print;
}

View file

@ -0,0 +1,82 @@
////////////////////////
// Default the Breakpoints variable
////////////////////////
$breakpoints: () !default;
$BREAKPOINTS: () !default;
////////////////////////
// Respond-to API Mixin
////////////////////////
@mixin respond-to($context, $no-query: false) {
@if length($breakpoints) > 0 and length($BREAKPOINTS) == 0 {
@warn "In order to avoid variable namespace collisions, we have updated the way to add breakpoints for respond-to. Please change all instances of `$breakpoints: add-breakpoint()` to `@include add-breakpoint()`. The `add-breakpoint()` function will be deprecated in a future release.";
$BREAKPOINTS: $breakpoints !global;
$breakpoints: () !global;
}
@if type-of($BREAKPOINTS) != 'map' {
// Just in case someone writes gibberish to the $breakpoints variable.
@warn "Your breakpoints aren't a map! `respond-to` expects a map. Please check the value of $BREAKPOINTS variable.";
@content;
}
@else if map-has-key($BREAKPOINTS, $context) {
@include breakpoint(map-get($BREAKPOINTS, $context), $no-query) {
@content;
}
}
@else if not map-has-key($BREAKPOINTS, $context) {
@warn "`#{$context}` isn't a defined breakpoint! Please add it using `$breakpoints: add-breakpoint(`#{$context}`, $value);`";
@content;
}
@else {
@warn "You haven't created any breakpoints yet! Make some already! `@include add-breakpoint($name, $bkpt)`";
@content;
}
}
//////////////////////////////
// Add Breakpoint to Breakpoints
// TODO: Remove function in next release
//////////////////////////////
@function add-breakpoint($name, $bkpt, $overwrite: false) {
$output: ($name: $bkpt);
@if length($breakpoints) == 0 {
@return $output;
}
@else {
@if map-has-key($breakpoints, $name) and $overwrite != true {
@warn "You already have a breakpoint named `#{$name}`, please choose another breakpoint name, or pass in `$overwrite: true` to overwrite the previous breakpoint.";
@return $breakpoints;
}
@else if not map-has-key($breakpoints, $name) or $overwrite == true {
@return map-merge($breakpoints, $output);
}
}
}
@mixin add-breakpoint($name, $bkpt, $overwrite: false) {
$output: ($name: $bkpt);
@if length($BREAKPOINTS) == 0 {
$BREAKPOINTS: $output !global;
}
@else {
@if map-has-key($BREAKPOINTS, $name) and $overwrite != true {
@warn "You already have a breakpoint named `#{$name}`, please choose another breakpoint name, or pass in `$overwrite: true` to overwrite the previous breakpoint.";
$BREAKPOINTS: $BREAKPOINTS !global;
}
@else if not map-has-key($BREAKPOINTS, $name) or $overwrite == true {
$BREAKPOINTS: map-merge($BREAKPOINTS, $output) !global;
}
}
}
@function get-breakpoint($name: false) {
@if $name == false {
@return $BREAKPOINTS;
}
@else {
@return map-get($BREAKPOINTS, $name);
}
}

71
_assets/css/vendor/breakpoint/_settings.scss vendored Executable file
View file

@ -0,0 +1,71 @@
//////////////////////////////
// Has Setting
//////////////////////////////
@function breakpoint-has($setting) {
@if map-has-key($breakpoint, $setting) {
@return true;
}
@else {
@return false;
}
}
//////////////////////////////
// Get Settings
//////////////////////////////
@function breakpoint-get($setting) {
@if breakpoint-has($setting) {
@return map-get($breakpoint, $setting);
}
@else {
@return map-get($Breakpoint-Settings, $setting);
}
}
//////////////////////////////
// Set Settings
//////////////////////////////
@function breakpoint-set($setting, $value) {
@if (str-index($setting, '-') or str-index($setting, '_')) and str-index($setting, ' ') == null {
@warn "Words in Breakpoint settings should be separated by spaces, not dashes or underscores. Please replace dashes and underscores between words with spaces. Settings will not work as expected until changed.";
}
$breakpoint: map-merge($breakpoint, ($setting: $value)) !global;
@return true;
}
@mixin breakpoint-change($setting, $value) {
$breakpoint-change: breakpoint-set($setting, $value);
}
@mixin breakpoint-set($setting, $value) {
@include breakpoint-change($setting, $value);
}
@mixin bkpt-change($setting, $value) {
@include breakpoint-change($setting, $value);
}
@mixin bkpt-set($setting, $value) {
@include breakpoint-change($setting, $value);
}
//////////////////////////////
// Remove Setting
//////////////////////////////
@function breakpoint-reset($settings...) {
@if length($settings) == 1 {
$settings: nth($settings, 1);
}
@each $setting in $settings {
$breakpoint: map-remove($breakpoint, $setting) !global;
}
@return true;
}
@mixin breakpoint-reset($settings...) {
$breakpoint-reset: breakpoint-reset($settings);
}
@mixin bkpt-reset($settings...) {
$breakpoint-reset: breakpoint-reset($settings);
}

View file

@ -0,0 +1,33 @@
//////////////////////////////
// Import Pieces
//////////////////////////////
@import "double/default-pair";
@import "double/double-string";
@import "double/default";
@function breakpoint-parse-double($feature, $empty-media, $first) {
$parsed: '';
$leader: '';
// If we're forcing
@if not ($empty-media) or not ($first) {
$leader: 'and ';
}
$first: nth($feature, 1);
$second: nth($feature, 2);
// If we've got two numbers, we know we need to use the default pair because there are no media queries that has a media feature that is a number
@if type-of($first) == 'number' and type-of($second) == 'number' {
$parsed: breakpoint-parse-default-pair($first, $second);
}
// If they are both strings, we send it through the string parser
@else if type-of($first) == 'string' and type-of($second) == 'string' {
$parsed: breakpoint-parse-double-string($first, $second);
}
// If it's a string/number pair, we parse it as a normal double
@else {
$parsed: breakpoint-parse-double-default($first, $second);
}
@return $leader + $parsed;
}

View file

@ -0,0 +1,82 @@
@function breakpoint-parse-query($query) {
// Parse features out of an individual query
$feature-holder: ();
$query-holder: ();
$length: length($query);
@if $length == 2 {
// If we've got a string/number, number/string, check to see if it's a valid string/number pair or two singles
@if (type-of(nth($query, 1)) == 'string' and type-of(nth($query, 2)) == 'number') or (type-of(nth($query, 1)) == 'number' and type-of(nth($query, 2)) == 'string') {
$number: '';
$value: '';
@if type-of(nth($query, 1)) == 'string' {
$number: nth($query, 2);
$value: nth($query, 1);
}
@else {
$number: nth($query, 1);
$value: nth($query, 2);
}
// If the string value can be a single value, check to see if the number passed in is a valid input for said single value. Fortunately, all current single-value options only accept unitless numbers, so this check is easy.
@if breakpoint-single-string($value) {
@if unitless($number) {
$feature-holder: append($value, $number, space);
$query-holder: append($query-holder, $feature-holder, comma);
@return $query-holder;
}
}
// If the string is a media type, split the query
@if breakpoint-is-media($value) {
$query-holder: append($query-holder, nth($query, 1));
$query-holder: append($query-holder, nth($query, 2));
@return $query-holder;
}
// If it's not a single feature, we're just going to assume it's a proper string/value pair, and roll with it.
@else {
$feature-holder: append($value, $number, space);
$query-holder: append($query-holder, $feature-holder, comma);
@return $query-holder;
}
}
// If they're both numbers, we assume it's a double and roll with that
@else if (type-of(nth($query, 1)) == 'number' and type-of(nth($query, 2)) == 'number') {
$feature-holder: append(nth($query, 1), nth($query, 2), space);
$query-holder: append($query-holder, $feature-holder, comma);
@return $query-holder;
}
// If they're both strings and neither are singles, we roll with that.
@else if (type-of(nth($query, 1)) == 'string' and type-of(nth($query, 2)) == 'string') {
@if not breakpoint-single-string(nth($query, 1)) and not breakpoint-single-string(nth($query, 2)) {
$feature-holder: append(nth($query, 1), nth($query, 2), space);
$query-holder: append($query-holder, $feature-holder, comma);
@return $query-holder;
}
}
}
@else if $length == 3 {
// If we've got three items and none is a list, we check to see
@if type-of(nth($query, 1)) != 'list' and type-of(nth($query, 2)) != 'list' and type-of(nth($query, 3)) != 'list' {
// If none of the items are single string values and none of the values are media values, we're good.
@if (not breakpoint-single-string(nth($query, 1)) and not breakpoint-single-string(nth($query, 2)) and not breakpoint-single-string(nth($query, 3))) and ((not breakpoint-is-media(nth($query, 1)) and not breakpoint-is-media(nth($query, 2)) and not breakpoint-is-media(nth($query, 3)))) {
$feature-holder: append(nth($query, 1), nth($query, 2), space);
$feature-holder: append($feature-holder, nth($query, 3), space);
$query-holder: append($query-holder, $feature-holder, comma);
@return $query-holder;
}
// let's check to see if the first item is a media type
@else if breakpoint-is-media(nth($query, 1)) {
$query-holder: append($query-holder, nth($query, 1));
$feature-holder: append(nth($query, 2), nth($query, 3), space);
$query-holder: append($query-holder, $feature-holder);
@return $query-holder;
}
}
}
// If it's a single item, or if it's not a special case double or triple, we can simply return the query.
@return $query;
}

View file

@ -0,0 +1,31 @@
@import "resolution/resolution";
@function breakpoint-build-resolution($query-print, $query-resolution, $empty-media, $first) {
$leader: '';
// If we're forcing
@if not ($empty-media) or not ($first) {
$leader: 'and ';
}
@if breakpoint-get('transform resolutions') and $query-resolution {
$resolutions: breakpoint-make-resolutions($query-resolution);
$length: length($resolutions);
$query-holder: '';
@for $i from 1 through $length {
$query: '#{$query-print} #{$leader}#{nth($resolutions, $i)}';
@if $i == 1 {
$query-holder: $query;
}
@else {
$query-holder: '#{$query-holder}, #{$query}';
}
}
@return $query-holder;
}
@else {
// Return with attached resolution
@return $query-print;
}
}

View file

@ -0,0 +1,26 @@
//////////////////////////////
// Import Pieces
//////////////////////////////
@import "single/default";
@function breakpoint-parse-single($feature, $empty-media, $first) {
$parsed: '';
$leader: '';
// If we're forcing
@if not ($empty-media) or not ($first) {
$leader: 'and ';
}
// If it's a single feature that can stand alone, we let it
@if (breakpoint-single-string($feature)) {
$parsed: $feature;
// Set Context
$context-setter: private-breakpoint-set-context($feature, $feature);
}
// If it's not a stand alone feature, we pass it off to the default handler.
@else {
$parsed: breakpoint-parse-default($feature);
}
@return $leader + '(' + $parsed + ')';
}

View file

@ -0,0 +1,36 @@
//////////////////////////////
// Import Pieces
//////////////////////////////
@import "triple/default";
@function breakpoint-parse-triple($feature, $empty-media, $first) {
$parsed: '';
$leader: '';
// If we're forcing
@if not ($empty-media) or not ($first) {
$leader: 'and ';
}
// separate the string features from the value numbers
$string: null;
$numbers: null;
@each $val in $feature {
@if type-of($val) == string {
$string: $val;
}
@else {
@if type-of($numbers) == 'null' {
$numbers: $val;
}
@else {
$numbers: append($numbers, $val);
}
}
}
$parsed: breakpoint-parse-triple-default($string, nth($numbers, 1), nth($numbers, 2));
@return $leader + $parsed;
}

View file

@ -0,0 +1,21 @@
@function breakpoint-parse-default-pair($first, $second) {
$default: breakpoint-get('default pair');
$min: '';
$max: '';
// Sort into min and max
$min: min($first, $second);
$max: max($first, $second);
// Set Context
$context-setter: private-breakpoint-set-context(min-#{$default}, $min);
$context-setter: private-breakpoint-set-context(max-#{$default}, $max);
// Make them EMs if need be
@if (breakpoint-get('to ems') == true) {
$min: breakpoint-to-base-em($min);
$max: breakpoint-to-base-em($max);
}
@return '(min-#{$default}: #{$min}) and (max-#{$default}: #{$max})';
}

View file

@ -0,0 +1,22 @@
@function breakpoint-parse-double-default($first, $second) {
$feature: '';
$value: '';
@if type-of($first) == 'string' {
$feature: $first;
$value: $second;
}
@else {
$feature: $second;
$value: $first;
}
// Set Context
$context-setter: private-breakpoint-set-context($feature, $value);
@if (breakpoint-get('to ems') == true) {
$value: breakpoint-to-base-em($value);
}
@return '(#{$feature}: #{$value})'
}

View file

@ -0,0 +1,22 @@
@function breakpoint-parse-double-string($first, $second) {
$feature: '';
$value: '';
// Test to see which is the feature and which is the value
@if (breakpoint-string-value($first) == true) {
$feature: $first;
$value: $second;
}
@else if (breakpoint-string-value($second) == true) {
$feature: $second;
$value: $first;
}
@else {
@warn "Neither #{$first} nor #{$second} is a valid media query name.";
}
// Set Context
$context-setter: private-breakpoint-set-context($feature, $value);
@return '(#{$feature}: #{$value})';
}

View file

@ -0,0 +1,60 @@
@function breakpoint-make-resolutions($resolution) {
$length: length($resolution);
$output: ();
@if $length == 2 {
$feature: '';
$value: '';
// Find which is number
@if type-of(nth($resolution, 1)) == 'number' {
$value: nth($resolution, 1);
}
@else {
$value: nth($resolution, 2);
}
// Determine min/max/standard
@if index($resolution, 'min-resolution') {
$feature: 'min-';
}
@else if index($resolution, 'max-resolution') {
$feature: 'max-';
}
$standard: '(#{$feature}resolution: #{$value})';
// If we're not dealing with dppx,
@if unit($value) != 'dppx' {
$base: 96dpi;
@if unit($value) == 'dpcm' {
$base: 243.84dpcm;
}
// Write out feature tests
$webkit: '';
$moz: '';
$webkit: '(-webkit-#{$feature}device-pixel-ratio: #{$value / $base})';
$moz: '(#{$feature}-moz-device-pixel-ratio: #{$value / $base})';
// Append to output
$output: append($output, $standard, space);
$output: append($output, $webkit, space);
$output: append($output, $moz, space);
}
@else {
$webkit: '';
$moz: '';
$webkit: '(-webkit-#{$feature}device-pixel-ratio: #{$value / 1dppx})';
$moz: '(#{$feature}-moz-device-pixel-ratio: #{$value / 1dppx})';
$fallback: '(#{$feature}resolution: #{$value / 1dppx * 96dpi})';
// Append to output
$output: append($output, $standard, space);
$output: append($output, $webkit, space);
$output: append($output, $moz, space);
$output: append($output, $fallback, space);
}
}
@return $output;
}

View file

@ -0,0 +1,13 @@
@function breakpoint-parse-default($feature) {
$default: breakpoint-get('default feature');
// Set Context
$context-setter: private-breakpoint-set-context($default, $feature);
@if (breakpoint-get('to ems') == true) and (type-of($feature) == 'number') {
@return '#{$default}: #{breakpoint-to-base-em($feature)}';
}
@else {
@return '#{$default}: #{$feature}';
}
}

View file

@ -0,0 +1,18 @@
@function breakpoint-parse-triple-default($feature, $first, $second) {
// Sort into min and max
$min: min($first, $second);
$max: max($first, $second);
// Set Context
$context-setter: private-breakpoint-set-context(min-#{$feature}, $min);
$context-setter: private-breakpoint-set-context(max-#{$feature}, $max);
// Make them EMs if need be
@if (breakpoint-get('to ems') == true) {
$min: breakpoint-to-base-em($min);
$max: breakpoint-to-base-em($max);
}
@return '(min-#{$feature}: #{$min}) and (max-#{$feature}: #{$max})';
}

View file

@ -292,7 +292,7 @@ button {
font-style: normal;
font-size: 28px;
font-family: $base-font;
font-family: $serif;
&:hover,
&:focus {

View file

@ -40,7 +40,7 @@ $mfp-include-mobile-layout-for-image: true; // Removes pad
// Image caption options
$mfp-caption-title-color: #f3f3f3; // Caption title color
$mfp-caption-subtitle-color: #bdbdbd; // Caption subtitle color
.mfp-counter { font-family: $base-font; } // Caption font family
.mfp-counter { font-family: $serif; } // Caption font family
// A11y
$mfp-use-visuallyhidden: false;

File diff suppressed because one or more lines are too long