This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Automasking | |
*/ | |
.mask-content { | |
position: relative; | |
padding: .2em 0; | |
width: 1.2em; | |
text-align: center; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Get the UIColor corresponding to a CSS hex color code (RGB[A] or RRGGBB[AA]) | |
/// | |
/// - Parameter hex: A hexadecimal representation of the colou | |
/// - Returns: The UIColor represented by the hexidecimal color code, or UIColor.clear if parsing failed | |
func colorFromHexString (hex:String) -> UIColor { | |
// Remove padding, leading hash symbol etc. | |
let hex = hex.trimmingCharacters(in: NSCharacterSet.alphanumerics.inverted) | |
// Get numeric representation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
height: 3000em; | |
} | |
.parallax { perspective: 1px; height: 100vh; overflow-x: hidden; overflow-y: auto;} | |
.parallax__layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0;} | |
.parallax__layer--base { transform: translateZ(0);}.parallax__layer--back { transform: translateZ(-1px);} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
height: 300%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Shirt pattern */ | |
/* Colours seen from the top down */ | |
background-image: /* 0 50 100 150 */ | |
linear-gradient(to left, white 10%, transparent 10%), /* white: w w w w */ | |
linear-gradient(to left, steelblue 50%, transparent 50%), /* light blue: llllllllll llllllllll */ | |
linear-gradient(to left, maroon 50%, navy 50%); /* red & blue: rrrrrrrrrrrrrrrrrrrrbbbbbbbbbbbbbbbbbbbb */ | |
background-size: 50px, 100px, 200px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simple transition example */ | |
input { | |
transition: background 2s; | |
} | |
input:focus { | |
background: fuchsia; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
height: 100%; | |
background: url(http://api.thumbr.it/whitenoise-200x200.png?background=4ea6ca00&noise=626262&density=45&opacity=10), | |
linear-gradient(15deg, hsla(10, 100%, 50%, 0.6), transparent 40%), | |
linear-gradient(-15deg, hsla(100, 80%, 30%, 0.6), transparent 40%), | |
linear-gradient(135deg, hsl(48, 100%, 84%) 10%, hsl(100, 50%, 50%) 30%, hsl(204, 47%, 45%) 50%, hsl(244, 27%, 55%) 80%); | |
} | |
body { | |
font-family: Segoe UI; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Disc nav on rainbow bg | |
*/ | |
html, | |
body { | |
background: #222 url(http://api.thumbr.it/whitenoise-200x200.png?background=22222200&noise=444444&density=20&opacity=20); | |
font-family: Segoe UI; | |
color: #fff; | |
margin: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
height: 100%; | |
} | |
body { | |
box-sizing: border-box; | |
font-family: "Open Sans"; | |
height: 100%; | |
margin: 0; | |
padding: 10px 20px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
height: 100%; | |
} | |
body { | |
box-sizing: border-box; | |
font-family: "Open Sans"; | |
height: 100%; | |
margin: 0; | |
padding: 10px 20px; |
NewerOlder