├── .gitignore ├── support ├── readme-foot.md └── readme-head.md ├── sass ├── _nowrap.sass ├── _force-wrap.sass ├── _antialias.sass ├── _ellipsis.sass ├── unicode │ ├── _quotes.sass │ └── _arrows.sass ├── _placeholder.sass ├── _animation.sass ├── _keyframes.sass ├── _layouts.sass ├── _textboxes.sass ├── _scrollbar-image.sass ├── _selection.sass ├── _retina.sass ├── _mobile-reset.sass ├── _ios-scrollable.sass ├── _position.sass └── _notch.sass ├── Makefile └── Readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | support/docs.md 2 | -------------------------------------------------------------------------------- /support/readme-foot.md: -------------------------------------------------------------------------------- 1 | Acknowledgements 2 | ---------------- 3 | 4 | MIT license 5 | -------------------------------------------------------------------------------- /sass/_nowrap.sass: -------------------------------------------------------------------------------- 1 | // ### nowrap 2 | // Disables wrapping. 3 | // 4 | // @import 'utils/nowrap'; 5 | // 6 | // .box { 7 | // @include nowrap; 8 | // } 9 | // 10 | = nowrap 11 | white-space: nowrap 12 | text-wrap: none 13 | word-wrap: none 14 | -------------------------------------------------------------------------------- /sass/_force-wrap.sass: -------------------------------------------------------------------------------- 1 | // ### force-wrap 2 | // Forces word wrapping by breaking words as needed. 3 | // 4 | // @import 'utils/force-wrap'; 5 | // 6 | // p { 7 | // @include force-wrap; 8 | // } 9 | // 10 | = force-wrap 11 | word-wrap: break-word 12 | word-break: break-all 13 | -------------------------------------------------------------------------------- /sass/_antialias.sass: -------------------------------------------------------------------------------- 1 | // ### antialias 2 | // Forces anti-aliasing on environments that support it (usually OSX and 3 | // Linux). 4 | // 5 | // @import 'utils/antialias'; 6 | // 7 | // * { 8 | // @include antialias; 9 | // } 10 | // 11 | = antialias 12 | text-rendering: optimizeLegibility 13 | -webkit-font-smoothing: antialiased 14 | -------------------------------------------------------------------------------- /sass/_ellipsis.sass: -------------------------------------------------------------------------------- 1 | // ### ellipsis 2 | // Turns a given container to show ellipsis after one line. 3 | // 4 | // @import 'utils/ellipsis'; 5 | // 6 | // .title { 7 | // @include ellipsis; 8 | // height: 1.5em; 9 | // line-height: 1.5em; 10 | // } 11 | // 12 | @import nowrap 13 | 14 | = ellipsis 15 | +nowrap 16 | text-overflow: ellipsis 17 | -o-text-overflow: ellipsis 18 | overflow: hidden 19 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Usage: 2 | # 3 | # make - Updates readme docs 4 | # make -B - Force updates 5 | # 6 | all: Readme.md 7 | 8 | Readme.md: support/readme-head.md support/docs.md support/readme-foot.md 9 | cat $^ > $@ 10 | 11 | support/docs.md: $(shell find sass/*.sass) 12 | cat $^ | egrep "^\/\/" | sed "s/^\/\/ //g" | sed "s/^\/\///g" > $@ 13 | 14 | clean: 15 | rm support/docs.md Readme.md 16 | 17 | .PHONY: clean all 18 | -------------------------------------------------------------------------------- /sass/unicode/_quotes.sass: -------------------------------------------------------------------------------- 1 | // ### utils/unicode/quotes 2 | // Contains angled quotes (eg, `$rsaquo`). 3 | // 4 | // See: https://en.wikipedia.org/wiki/Curved_quotes#Quotation_marks_in_English 5 | // 6 | $rsaquo: '\203a' // Right single angled quote (›) 7 | $lsaquo: '\2039' // Left single angled quote (‹) 8 | $raquo: '\00bb' // Right double angled quote (») 9 | $laquo: '\00ab' // Left double angled quote («) 10 | -------------------------------------------------------------------------------- /sass/_placeholder.sass: -------------------------------------------------------------------------------- 1 | // ### placeholder 2 | // Style the placeholder text for inputs. 3 | // 4 | // input { 5 | // @include placeholder { 6 | // color: #aaa; 7 | // } 8 | // } 9 | // 10 | = placeholder 11 | &::-moz-placeholder /* FF19+ */ 12 | @content 13 | &:-moz-placeholder /* FF18- */ 14 | @content 15 | &:-ms-input-placeholder 16 | @content 17 | &::-webkit-input-placeholder 18 | @content 19 | -------------------------------------------------------------------------------- /support/readme-head.md: -------------------------------------------------------------------------------- 1 | CSS utils 2 | ========= 3 | 4 | Collection of Sass utilities. 5 | 6 | How to use 7 | ---------- 8 | 9 | Each stylesheet is self-contained, so simply pick out what you need and put it 10 | in your project. 11 | 12 | [View stylesheets >]( sass/ ) 13 | 14 | #### Example 15 | 16 | ~~~ sh 17 | cd ~/my/project/sass/ 18 | wget https://raw.github.com/rstacruz/cssutils/master/sass/_antialias.sass 19 | ~~~ 20 | 21 | Utilities 22 | --------- 23 | 24 | -------------------------------------------------------------------------------- /sass/_animation.sass: -------------------------------------------------------------------------------- 1 | // ### animation 2 | // CSS animations, since Compass doesn't have any provisions for animation. 3 | // Also see [keyframes](#keyframes). 4 | // 5 | // @import 'utils/animation'; 6 | // 7 | // .box { 8 | // @include animation(bounce 300ms linear infinite); 9 | // } 10 | // 11 | = animation($args) 12 | -webkit-animation: $args 13 | -moz-animation: $args 14 | -ms-animation: $args 15 | -o-animation: $args 16 | animation: $args 17 | -------------------------------------------------------------------------------- /sass/_keyframes.sass: -------------------------------------------------------------------------------- 1 | // ### keyframes 2 | // Defines keyframes for an animation. 3 | // 4 | // @import 'utils/keyframes'; 5 | // 6 | // @include keyframes { 7 | // 0% { opacity: 0; } 8 | // 100% { opacity: 1.0; } 9 | // } 10 | // 11 | = keyframes($name) 12 | @-webkit-keyframes #{$name} 13 | @content 14 | @-moz-keyframes #{$name} 15 | @content 16 | @-o-keyframes #{$name} 17 | @content 18 | @-ms-keyframes #{$name} 19 | @content 20 | @-khtml-keyframes #{$name} 21 | @content 22 | @keyframes #{$name} 23 | @content 24 | -------------------------------------------------------------------------------- /sass/unicode/_arrows.sass: -------------------------------------------------------------------------------- 1 | // ### unicode/arrows 2 | // Contains arrow symbols. (eg: `$larr`) 3 | // 4 | // See: https://en.wikipedia.org/wiki/Arrow_(symbol) 5 | // 6 | $larr: '\2190' // Left arrow (&larr) 7 | $uarr: '\2191' // Up arrow (&uarr) 8 | $rarr: '\2192' // Right arrow (&larr) 9 | $darr: '\2193' // Down arrow (&darr) 10 | $lrarr: '\2194' // Left right arrow (<->) 11 | $uparr: '\2195' // Up down arrow 12 | $nwarr: '\2196' // North west arrow 13 | $nearr: '\2197' // North east arrow 14 | $searr: '\2198' // South east arrow 15 | $swarr: '\2199' // South west arrow 16 | 17 | -------------------------------------------------------------------------------- /sass/_layouts.sass: -------------------------------------------------------------------------------- 1 | @import compass/utilities/general/clearfix 2 | 3 | = fixed-right-sidebar($size: 200px, $gutter: 20px) 4 | +pie-clearfix 5 | padding-right: $size + $gutter 6 | 7 | .main 8 | float: left 9 | 10 | .side 11 | margin-right: -1 * ($size + $gutter) 12 | width: $size 13 | float: right 14 | 15 | = fixed-left-sidebar($size: 200px, $gutter: 20px) 16 | +pie-clearfix 17 | padding-left: $size + $gutter 18 | 19 | .main 20 | float: right 21 | 22 | .side 23 | margin-left: -1 * ($size + $gutter) 24 | width: $size 25 | float: left 26 | 27 | -------------------------------------------------------------------------------- /sass/_textboxes.sass: -------------------------------------------------------------------------------- 1 | // ### $textinputs 2 | // Text inputs. 3 | // 4 | // @import 'utils/textboxes'; 5 | // 6 | // #{$textinputs} { 7 | // background: white; 8 | // ... 9 | // } 10 | // 11 | $textinputs: "input[type=text], input[type=password], input[type=email], input[type=search], input[type=url], input[type=number]" 12 | 13 | // ### $textboxes 14 | // Text inputs, including textarea. 15 | // 16 | // @import 'utils/textboxes'; 17 | // 18 | // #{$textboxes} { 19 | // background: white; 20 | // ... 21 | // } 22 | // 23 | $textboxes: "#{$textinputs}, textarea" 24 | -------------------------------------------------------------------------------- /sass/_scrollbar-image.sass: -------------------------------------------------------------------------------- 1 | // ### scrollbar-image 2 | // Enables webkit scrollbars using an image. 3 | // Make a 16x16 PNG image of a circle. This will be expanded to fill the scrollbar. 4 | // 5 | // html { 6 | // @include scrollbar-image(url(scroll-dark.png), 16px); 7 | // } 8 | // 9 | = scrollbar-image($image, $size: 16px) 10 | $half: floor($size / 2) 11 | $half-n: $half / ($half * 0 + 1) 12 | 13 | &::-webkit-scrollbar 14 | width: $size 15 | height: $size 16 | 17 | &::-webkit-scrollbar-thumb 18 | border-width: $half $half $half $half 19 | -webkit-border-image: $image $half-n $half-n $half-n $half-n round round 20 | -------------------------------------------------------------------------------- /sass/_selection.sass: -------------------------------------------------------------------------------- 1 | // ### selection 2 | // Changes selection color. 3 | // 4 | // @import 'utils/selection'; 5 | // 6 | // .header { 7 | // @include selection { 8 | // background: #fa30f0; 9 | // color: white; 10 | // } 11 | // } 12 | // 13 | = selection 14 | &::selection 15 | @content 16 | &::-moz-selection 17 | @content 18 | 19 | // ### root-selection 20 | // Changes selection color for the entire document. Include it at the top level. 21 | // 22 | // @import 'utils/selection'; 23 | // 24 | // @include root-selection { 25 | // background: #fa30f0; 26 | // color: white; 27 | // } 28 | // 29 | = root-selection 30 | ::selection 31 | @content 32 | ::-moz-selection 33 | @content 34 | 35 | -------------------------------------------------------------------------------- /sass/_retina.sass: -------------------------------------------------------------------------------- 1 | // ### retina 2 | // Media query for retina support. 3 | // 4 | // @import 'utils/retina'; 5 | // 6 | // .box { 7 | // @include retina { 8 | // background-image: url(icon@2x.png); 9 | // } 10 | // } 11 | // 12 | = retina 13 | +hidpi(1.5, "3/2") 14 | @content 15 | 16 | // ### hidpi 17 | // Media query for high-DPI resolutions. Consider using [retina](#retina) 18 | // instead. 19 | // 20 | // @import 'utils/retina'; 21 | // 22 | // .box { 23 | // @include hidpi(2) { 24 | // ... 25 | // } 26 | // } 27 | // 28 | = hidpi($ratio: 2, $opera-ratio: "#{$ratio}/1") 29 | @media (-o-min-device-pixel-ratio: $opera-ratio), (min--moz-device-pixel-ratio: $ratio), (-webkit-min-device-pixel-ratio: $ratio), (min-device-pixel-ratio: $ratio), (min-resolution: #{$ratio}dppx) 30 | @content 31 | -------------------------------------------------------------------------------- /sass/_mobile-reset.sass: -------------------------------------------------------------------------------- 1 | // ### mobile-reset 2 | // Disables common tap stuff for iOS webapps to make them behave more like 3 | // native apps: text selection, tap highlight colors, image save panel popup, 4 | // and automatic font resizing. 5 | // 6 | // @import 'utils/mobile-reset'; 7 | // 8 | // // Use it at the top level 9 | // @include mobile-reset; 10 | // 11 | // References: 12 | // - http://wiki.phonegap.com/w/page/16494795/iPhone%3A%20Prevent%20callout,%20link%20selection,%20text%20auto-resize 13 | // - http://www.bitsandpix.com/entry/ios-webkit-uiwebview-remove-tapclick-highlightborder-with-css/ 14 | // 15 | = mobile-reset 16 | * 17 | /* Disable text selection */ 18 | -webkit-user-select: none 19 | user-select: none 20 | 21 | /* Disable the image save panel (popup) */ 22 | -webkit-touch-callout: none 23 | 24 | /* Prevent WebKit from resizing text to fit */ 25 | -webkit-text-size-adjust: none 26 | 27 | /* Turn off link highlights */ 28 | -webkit-tap-highlight-color: transparent 29 | 30 | /* For forms */ 31 | input, textarea, select 32 | -webkit-user-select: auto 33 | user-select: auto 34 | -webkit-touch-callout: auto 35 | -------------------------------------------------------------------------------- /sass/_ios-scrollable.sass: -------------------------------------------------------------------------------- 1 | // ### ios-scrollbar-y 2 | // Enables fancy scrolling in iOS via nested divs. 3 | // 4 | // @import 'utils/ios-scrollable'; 5 | 6 | // .panel { 7 | // @include ios-scrollable-y; 8 | // position: relative; 9 | // } 10 | // 11 | // Note that your markup has to have a `div` wrapper inside, like this: 12 | // 13 | //