Create guides easily with this Scss mixin (like guides in Photoshop). Useful for creating prototypes and aligning elements.
A Pen by CrocoDillon on CodePen.
Create guides easily with this Scss mixin (like guides in Photoshop). Useful for creating prototypes and aligning elements.
A Pen by CrocoDillon on CodePen.
Setting font-size and line-height, should be easy. With this CSS, you just type your sizes, and SASS make sit into ems. Quick and easy :)
A Pen by Johan Roug on CodePen.
if($('.bootswatcher')[0]){ | |
$('.bootswatcher').remove(); | |
} else { | |
var $e = $('<select class="bootswatcher"><option>Amelia</option><option>Cerulean</option><option>Cyborg</option><option>Journal</option><option>Readable</option><option>Simplex</option><option>Slate</option><option>Spacelab</option><option>Spruce</option><option>Superhero</option><option>United</option></select>'); | |
var l = 1 + Math.floor(Math.random() * $e.children().length); | |
$e.css({'z-index': '99999', 'position': 'fixed', 'top': '5px', 'right': '5px', 'opacity': '0.5'} | |
).hover( | |
function(){$(this).css('opacity', '1');}, | |
function(){$(this).css('opacity', '0.5');} | |
).change(function(){ |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body { | |
display: flex; | |
flex-direction: column; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Js Form Validator</title> | |
<link rel="stylesheet" href="stylesheet/style.css"> | |
</head> | |
<body> | |
<div class="container"> |
# http://www.robotstxt.org/ | |
User-agent: * | |
Disallow: /admin/ | |
Sitemap: http://www.exemple.com/sitemap.xml |
// Capitalize first letter | |
undefined = true; | |
((window,document,undefined) => { | |
const capitalize = word => { | |
var upperCase = word.toUpperCase().substring(0,1) | |
var lowerCase = word.toLowerCase().substring(1, word.length); | |
return `${upperCase}${lowerCase}`; | |
} |