Skip to content

Instantly share code, notes, and snippets.

View ffoodd's full-sized avatar
🎯
Focusing

Gaël Poupard ffoodd

🎯
Focusing
View GitHub Profile
@ffoodd
ffoodd / improved-sr-only.markdown
Last active April 11, 2024 22:55
Improved .sr-only

Improved .sr-only

Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.

A Pen by ffoodd on CodePen.

License.

@ffoodd
ffoodd / index.css
Created June 21, 2019 12:00 — forked from stereokai/index.css
Trigonometry in CSS
//----------------------------------*\
// TRIGONOMETRY FUNCTIONS
//----------------------------------*/
// # Trigonometry in CSS
//
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf
// - Useful if you don't want to use JS.
// - With CSS Variables.
// - `calc()` can't do power (x ^ y) so I used multiplication instead.
@ffoodd
ffoodd / mu-fSelect.js
Created December 4, 2017 13:27
FacetWP accessibility improvements
(function($) {
$.fn.fSelect = function(options) {
if ('string' === typeof options) {
var settings = options;
}
else {
var settings = $.extend({
placeholder: 'Select some options',
@ffoodd
ffoodd / input.scss
Created July 6, 2021 10:21
Generated by SassMeister.com.
@function add($value1, $value2, $return-calc: true) {
@if $value1 == null {
@return $value2;
}
@if $value2 == null {
@return $value1;
}
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
@ffoodd
ffoodd / input.scss
Last active July 6, 2021 10:20
Generated by SassMeister.com.
@function add($value1, $value2, $return-calc: true) {
@if $value1 == null {
@return $value2;
}
@if $value2 == null {
@return $value1;
}
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
@ffoodd
ffoodd / input.scss
Created May 20, 2021 14:50
Generated by SassMeister.com.
@function add($value1, $value2, $return-calc: true) {
@if $value1 == null {
@return $value2;
}
@if $value2 == null {
@return $value1;
}
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
@ffoodd
ffoodd / input.scss
Created May 20, 2021 14:30
Generated by SassMeister.com.
@function add($value1, $value2, $return-calc: true) {
@if $value1 == null {
@return $value2;
}
@if $value2 == null {
@return $value1;
}
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
@ffoodd
ffoodd / input.scss
Created May 7, 2021 09:20
Generated by SassMeister.com.
$theme-colors: (
"primary": #0d6efd
);
$list-group-color: #911;
@each $state, $value in $theme-colors {
$list-group-color: $value;
.list-group-inside { color: $list-group-color; }
@ffoodd
ffoodd / input.scss
Created May 7, 2021 09:19
Generated by SassMeister.com.
$theme-colors: (
"primary": #0d6efd
);
$list-group-color: #911;
@each $state, $value in $theme-colors {
$list-group-color: $value;
.list-group-inside { color: $list-group-color; }
@ffoodd
ffoodd / input.scss
Created May 4, 2021 20:46
Generated by SassMeister.com.
$primary: #0d6efd;
@function shade-color($color, $weight) {
@return mix(black, $color, $weight);
}
a {
color: darken($primary, 20%);
}