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 / _box-sizing.scss
Created September 4, 2020 06:22
Universal Box Sizing with Inheritance
/* Universal Box Sizing with Inheritance <https://css-tricks.com/box-sizing/#universal-box-sizing-with-inheritance>< */
html {
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: inherit;
}
// source <http://www.alistapart.com/articles/getting-started-with-sass/>
// <http://nicolasgallagher.com/micro-clearfix-hack/>
@mixin clearfix {
// For modern browsers
&:before,
&:after {
content:"";
display:table;
} &:after {
clear:both;
@joellesenne
joellesenne / .htaccess
Last active September 3, 2020 17:50
Module mod rewrite in dist directory
# Module mod rewrite in dist directory
Options -Indexes
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@joellesenne
joellesenne / .htaccess
Last active September 3, 2020 17:51
Module mod rewrite public
# Module mod rewrite public
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
@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}`;
}
* {
margin: 0;
padding: 0;
border: 0;
}
/* <https://codepen.io/michellebarker/pen/poyogzmvvv> */
.parent {
filter: drop-shadow(0.4rem 0.4rem 0.45rem rgba(0, 0, 30, 0.5))
}
.children {
// Code here
}
/* Universal Box Sizing with Inheritance */
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
The MIT License (MIT)
Copyright (©) 2020 Joël Lesenne <contact@joellesenne.dev>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: