Skip to content

Instantly share code, notes, and snippets.

View joellesenne's full-sized avatar
🏠
Working from home

Joël Lesenne joellesenne

🏠
Working from home
View GitHub Profile
@joellesenne
joellesenne / Scss-Guides.markdown
Created May 6, 2014 19:56
A Pen by CrocoDillon.

Scss Guides

Create guides easily with this Scss mixin (like guides in Photoshop). Useful for creating prototypes and aligning elements.

A Pen by CrocoDillon on CodePen.

License.

Responsive Font Sizing

Responsive CSS font sizing generator including SCSS @mixin.

In short it creates a list of media queries creating relation between page width and font size – making em and percent based fonts scalable .

No js needed... If you don't care about ie8 ;)

Thanks for visiting Jakob E

Easy SCSS font-size

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.

License.

SCSS Unit Conversion

PX, EM, REM, CM, PT, PC, MM, DEG, TURN, RAD, GRAD, NUMBER, INT, PERCENT

  • What is missing? - please comment :)

A Pen by jakob-e on CodePen.

License.

@joellesenne
joellesenne / bootswatchlet.js
Created September 9, 2012 08:22 — forked from thomaspark/bootswatchlet.js
Bootswatch bookmarklet
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(){
@joellesenne
joellesenne / SCSS.md
Created September 1, 2017 17:50 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

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

@joellesenne
joellesenne / index.html
Last active February 13, 2018 20:59 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/pisuxex
<!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;
@joellesenne
joellesenne / index.html
Last active April 29, 2020 13:03
JS form validation
<!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
@joellesenne
joellesenne / capitalizeFirstLetter.js
Created September 3, 2020 06:14
Capitalize the First Letter of a String in JavaScript
// 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}`;
}