Skip to content

Instantly share code, notes, and snippets.

@Dunkh4n
Dunkh4n / bricks-builder-padding-margin-display
Last active July 27, 2022 09:32
Bricks Builder, rework of Padding & Margin display
/* --- Margin / Padding area --- */
div[data-controlKey='_margin'] ul.dimensions,
div[data-controlKey='_padding'] ul.dimensions,
div[data-controlKey='_innerContainerMargin'] ul.dimensions,
div[data-controlKey='_innerContainerPadding'] ul.dimensions,
div[data-controlKey='menuMargin'] ul.dimensions,
div[data-controlKey='menuPadding'] ul.dimensions,
div[data-controlKey='subMenuPadding'] ul.dimensions,
div[data-controlKey='mobileMenuPadding'] ul.dimensions,
/**
* Use the default user interface font in all browsers (opinionated).
*/
html {
font-family: system-ui, /* macOS 10.11-10.12 */ -apple-system,
/* Windows 6+ */ 'Segoe UI', /* Android 4+ */ 'Roboto',
/* Ubuntu 10.10+ */ 'Ubuntu', /* Gnome 3+ */ 'Cantarell',
/* KDE Plasma 5+ */ 'Noto Sans', /* fallback */ sans-serif,
@font-face {
font-family: "FONT_NAME";
font-weight: normal;
font-style: normal;
src: url("../fonts/FILE_FONT_NAME.eot");
src: local("FONT_NAME"),
url("../fonts/FILE_FONT_NAME.woff2") format("woff2"),
url("../fonts/FILE_FONT_NAME.woff") format("woff"),
url("../fonts/FILE_FONT_NAME.ttf") format("truetype");
}
Go to constants.php
Go to line 303. (or) look for define( ‘AI1WM_MAX_FILE_SIZE’, 2 << 28 );
( ‘AI1WM_MAX_FILE_SIZE’, 2 << 28 );
to
( ‘AI1WM_MAX_FILE_SIZE’, 536870912 * 2 )
@Dunkh4n
Dunkh4n / WP Font fluid typography functions.php
Last active November 20, 2019 11:59
WP snippet for fluid font
<?php
add_action( 'wp_head', function () { ?>
<style>
.header-1 {
--min-size: 18;
--max-size: 56;
--min-viewport: 480;
--max-viewport: 1120;
u = User
g = Group
o = Other
Octal is used for permissions because it's an easy conversion. Each group of rwx forms one octal digit.
All you have to remember is the first 3 powers of 2: 4, 2, 1.
r = 4
w = 2
x = 1
@Dunkh4n
Dunkh4n / easing.js
Created July 10, 2018 13:01 — forked from gre/easing.js
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity