Skip to content

Commit

Permalink
Merge pull request #31 from kni-labs/updates
Browse files Browse the repository at this point in the history
Updates
  • Loading branch information
dbox authored Jul 15, 2016
2 parents 1470f00 + 3933852 commit 8161e45
Show file tree
Hide file tree
Showing 7 changed files with 1,633 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pages
Submodule .pages updated from 99b6b9 to a93633
1 change: 1 addition & 0 deletions .scss-lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
scss_files: "**/*.scss"
exclude: "**/_reset.scss"
linters:
BangFormat:
enabled: true
Expand Down
3 changes: 2 additions & 1 deletion knapsack/_animation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ $ease-in-out-swift: cubic-bezier(0.900, 0, 0.100, 1);
/// @link http://codepen.io/dbox/pen/ZboVOg

@mixin animated($animation-name: null, $animation-duration: .65s, $animation-delay: null, $animation-easing: $ease-out-quad) {
animation-timing-function: $animation-easing;
animation-duration: $animation-duration;
animation-fill-mode: both;
animation-iteration-count: 1;
animation-timing-function: $animation-easing;

@if ($animation-name) {
animation-name: $animation-name;
Expand Down
3 changes: 2 additions & 1 deletion knapsack/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,10 @@
left: 0;
margin-left: auto;
margin-right: auto;
max-width: $width;
position: absolute;
right: 0;
width: $width;
width: 100%;
}

//- Mixin: Material Shadow
Expand Down
30 changes: 30 additions & 0 deletions knapsack/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,21 @@
font-weight: bold;
}
}


//- Mixin: Sanitize
///
/// Sanitize css. Another reset. Call this on the root of your project.
///
/// @group reset
/// @example
/// @include sanitize();
/// @link https://github.com/jonathantneal/sanitize.css

@mixin sanitize {
/*! sanitize.css v4.1.0 | CC0 License | github.com/jonathantneal/sanitize.css */article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}template,[hidden]{display:none}*,::before,::after{background-repeat:no-repeat;box-sizing:inherit}::before,::after{text-decoration:inherit;vertical-align:inherit}html{box-sizing:border-box;cursor:default;font-family:sans-serif;line-height:1.5;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}h1{font-size:2em;margin:.67em 0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{height:0;overflow:visible}nav ol,nav ul{list-style:none}abbr[title]{border-bottom:1px dotted;text-decoration:none}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}progress{vertical-align:baseline}small{font-size:83.3333%}sub,sup{font-size:83.3333%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}::-moz-selection{background-color:#b3d4fc;color:#000;text-shadow:none}::selection{background-color:#b3d4fc;color:#000;text-shadow:none}audio,canvas,iframe,img,svg,video{vertical-align:middle}img{border-style:none}svg{fill:currentColor}svg:not(:root){overflow:hidden}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{outline-width:0}table{border-collapse:collapse;border-spacing:0}button,input,select,textarea{background-color:transparent;border-style:none;color:inherit;font-size:1em;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto;resize:vertical}[type="checkbox"],[type="radio"]{padding:0}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-cancel-button,::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}[aria-busy="true"]{cursor:progress}[aria-controls]{cursor:pointer}[aria-disabled]{cursor:default}a,area,button,input,label,select,textarea,[tabindex]{-ms-touch-action:manipulation;touch-action:manipulation}[hidden][aria-hidden="false"]{clip:rect(0,0,0,0);display:inherit;position:absolute}[hidden][aria-hidden="false"]:focus{clip:auto}
}

// Additional esets via scut:
// https://github.com/davidtheclark/scut/
// Clickable form elements should have a pointer.
Expand Down Expand Up @@ -447,6 +462,20 @@
margin: 0;
}
}

@mixin reset-headers {
h1, h2, h3, h4, h5, h6 {
display: block;
font-weight: normal;
margin: 1rem 0;

&:first-child {
margin-top: 0;
}

a { color: inherit; }
}
}
// Call them all
@mixin reset-elements() {
@include reset-border-box;
Expand All @@ -456,4 +485,5 @@
@include reset-media;
@include reset-paragraph;
@include reset-pointer;
@include reset-headers;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "knapsack",
"version": "0.4.1",
"version": "1.0.0",
"description": "A handy bag of sass utilities and mixins",
"main": "knapsack/_index.scss",
"repository": {
Expand Down
Loading

0 comments on commit 8161e45

Please sign in to comment.