Skip to content

Instantly share code, notes, and snippets.

View mherchel's full-sized avatar

Michael Herchel mherchel

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*
https://css-tricks.com/theming-with-variables-globals-and-locals/
https://medium.com/eightshapes-llc/tokens-in-design-systems-25dd82d58421
https://bradfrost.com/blog/post/creating-themeable-design-systems/
*/
.root-frontend {
--color-primary: xxx;
--color-neutral: #777;
@import "../base/media-queries.pcss.css";
/* Breakpoint where tabs switch between vertical and horizontal layouts. */
@custom-media --tabs-layout-switch (--md);
.tabs {
--tabs-height: var(--sp3);
--tabs-padding-inline: var(--sp1-5);
--tabs-active-border-size: 6px;
--tabs-highlight-color: var(--color--blue-50); /* Minimum 3:1 contrast ratio against --tabs-background-color and --tabs-background-color-hover. */
# This is a dotenv file used by JavaScript tasks.
# Copy this to '.env' to override.
#############################
# General Test Environment #
#############################
# This is the URL that Drupal can be accessed by. You don't need an installed
# site here, just make sure you can at least access the installer screen. If you
# don't already have one running, e.g. Apache, you can use PHP's built-in web
# server by running the following command in your Drupal root folder:
@mherchel
mherchel / field--field-media-audio-file.html.twig
Last active September 19, 2021 13:15
Lullabot.com MP3 Player
{{ attach_library('lullabotcom/mp3player') }}
{% for item in items %}
{# Default implentation of audio element is hidden from modern browsers and shown to IE11. #}
<audio class="u-noscript-visible u-ie11-visible mp3player--default" controls>
<source src="{{ item.content }}" type="audio/mpeg">
</audio>
<div class="u-noscript-hidden u-ie11-hidden mp3player">
layout_onecol:
label: 'One column'
path: layouts/onecol
template: layout--onecol
library: layout_discovery/onecol
category: 'Columns: 1'
default_region: content
icon_map:
- [content]
const mobileNavButtonSelector = 'button.mobile-nav-button';
const headerNavSelector = '#header-nav';
const linkSubMenuId = 'home-submenu-1';
const buttonSubMenuId = 'button-submenu-2';
const focusTrapCheck = (browser, tabCount, tabBackwards) => {
if (tabBackwards === true) browser.keys(browser.Keys.SHIFT);
for (let i = 0; i < tabCount; i++) {
browser.keys(browser.Keys.TAB).pause(50);
}
browser.execute(
"black": (
100: #000000),
"blue": (
10: #edf5ff,
20: #d0e2ff,
30: #a6c8ff,
40: #78a9ff,
50: #4589ff,
60: #0f62fe,
70: #0043ce,