Skip to content

Instantly share code, notes, and snippets.

View tedw's full-sized avatar

Ted Whitehead tedw

  • Threespot
  • Washington, DC
View GitHub Profile
@tedw
tedw / elements.txt
Created February 13, 2024 22:06
List of elements and attributes returned by `wp_kses_allowed_html('post')` https://developer.wordpress.org/reference/functions/wp_kses_allowed_html/
a
abbr
acronym
address
align
alt
area
aria-controls
aria-current
aria-describedby
@tedw
tedw / gist:f86cb8851c05ba35cbda8d1bcc6aa81b
Created February 13, 2024 22:05
List of elements and attributes returned by `wp_kses_allowed_html('post')`
a
abbr
acronym
address
align
alt
area
aria-controls
aria-current
aria-describedby
@tedw
tedw / global-styles.css
Created November 15, 2023 22:27
WP global inline styles
body {
--wp--preset--color--black: #000000;
--wp--preset--color--cyan-bluish-gray: #abb8c3;
--wp--preset--color--white: #ffffff;
--wp--preset--color--pale-pink: #f78da7;
--wp--preset--color--vivid-red: #cf2e2e;
--wp--preset--color--luminous-vivid-orange: #ff6900;
--wp--preset--color--luminous-vivid-amber: #fcb900;
--wp--preset--color--light-green-cyan: #7bdcb5;
--wp--preset--color--vivid-green-cyan: #00d084;
@tedw
tedw / input.scss
Created September 19, 2023 19:15
Generated by SassMeister.com.
/// Convert px to rem
/// @group Main
/// @param {Number | Map} $values - Value values to convert
/// @param {Number} $context [$fs-base-font-size] - Base font size
/// @return {*} - Converted value or list of values
/// @require {variable} $fs-base-font-size - Base font size
@function rem($values) {
// Placeholder list for converted values
$output: ();
@tedw
tedw / input.scss
Created September 19, 2023 19:14
Generated by SassMeister.com.
/// Convert px to rem
/// @group Main
/// @param {Number | Map} $values - Value values to convert
/// @param {Number} $context [$fs-base-font-size] - Base font size
/// @return {*} - Converted value or list of values
/// @require {variable} $fs-base-font-size - Base font size
@function fs-rem($values) {
// Placeholder list for converted values
$output: ();
@tedw
tedw / input.scss
Created August 9, 2022 18:11 — forked from matbrady/input.scss
Generated by SassMeister.com.
$grid-columns: 1;
$layoutBreakPoints: (
"med-small" : 580px,
);
@each $name, $width in $layoutBreakPoints {
.u-col {
@for $col from 1 through $grid-columns {
&-test {
background: red ;
@tedw
tedw / parallax.css
Created June 30, 2022 13:25
Parallax custom CSS for use with https://stylebot.dev
body {
font-family: system-ui, Segoe UI, sans-serif;
}
/* Month and week row */
[class*="ShaperHeaderCell_innerContainer"] {
justify-content: center;
}
/* Month text */
@tedw
tedw / critical.js
Created March 10, 2022 15:03
CSS for supporting iOS accessibility text size
(function() {
var ua = navigator.userAgent,
d = document.documentElement,
classes = d.className;
// Replace 'no-js' class name with 'js' (optional)
classes = classes.replace('no-js', 'js');
// Detect iOS user-agent string
// http://stackoverflow.com/questions/9038625/detect-if-device-is-ios/9039885#9039885
@tedw
tedw / input.scss
Created April 1, 2021 20:32
Generated by SassMeister.com.
$fs-base-font-size: 16px !default;
@function fs-em($values, $context: $fs-base-font-size) {
// Ensure context size is in pixels
@if unit($context) != 'px' {
@error '🔴 #{$context} size must be in pixels';
}
// Placeholder list for converted values
@tedw
tedw / input.scss
Created April 1, 2021 18:29
Generated by SassMeister.com.
$foo: "foo";
$map: (
key: value,
text: "Lorem ipsum",
$foo: "bar",
color: #f00,
320px: 16px,
);