Skip to content

Instantly share code, notes, and snippets.

View kizu's full-sized avatar
🍵
Enjoying some tea

Roman Komarov kizu

🍵
Enjoying some tea
View GitHub Profile
@kizu
kizu / overrides.css
Last active November 15, 2022 21:02
Mastodon absent image description styles
.compose-form:has(.compose-form__upload__warning) .compose-form__publish .button,
.compose-form__upload__warning .icon-button {
border: medium dashed red;
}
.compose-form__upload-thumbnail:has(.compose-form__upload__warning) .compose-form__upload__actions .icon-button:has(.fa-pencil) {
border: medium dashed lime;
}
.compose-form:has(.compose-form__upload__warning) .compose-form__publish::before {
@kizu
kizu / getPropValues.js
Created December 20, 2017 17:51
Getting all keywords and types from CSSTree lexer
const getPropValues = (prop) => {
const keywords = [];
const types = [];
const searcher = (node) => {
if (!node) return;
if (node.type === 'Keyword' && keywords.indexOf(node.name) === -1) {
keywords.push(node.name);
} else if (node.type === 'Group') {
node.terms.map(term => csstree.grammar.walk(term, { enter: searcher }));
} else if (node.type === 'Type') {
@kizu
kizu / dabblet.css
Created May 31, 2017 12:35
This should work when you have the button in focus and press space on keyboard
/* This should work when you have the button in focus and press space on keyboard */
/* See https://html.spec.whatwg.org/multipage/scripting.html#selector-active */
/* Firefox currently won't behave properly there! */
button:active {
background: lime;
}
@kizu
kizu / feed-only-content.html
Last active February 7, 2017 09:07
Invisible cut for LJ
<div style="display:none;"><lj-cut><div style="display:none;"></lj-cut></div>Часть, видимая только в ленте, но не в посте<div style="display:none;"><lj-cut></div></lj-cut></div>
@kizu
kizu / dabblet.css
Last active October 26, 2016 13:11
Testing empty values
/* Testing empty values */
.test:before { content: attr(class); }
.test {
border: var(--bar) solid;
}
.test_valid {
--bar: ;
@kizu
kizu / dabblet.css
Created October 26, 2016 12:55
Oh hai, Selectors level 4!
/* Oh hai, Selectors level 4! */
/* https://drafts.csswg.org/selectors-4/ */
/* Try this at http://nightly.webkit.org/ */
div:before {
content: attr(class);
}
.a.b:not(.c) {
background: red;
@kizu
kizu / dabblet.css
Created October 26, 2016 12:55
Oh hai, Selectors level 4!
/* Oh hai, Selectors level 4! */
/* https://drafts.csswg.org/selectors-4/ */
/* Try this at http://nightly.webkit.org/ */
div:before {
content: attr(class);
}
.a.b:not(.c) {
background: red;
@kizu
kizu / dabblet.css
Last active September 26, 2016 22:24
Untitled
.test {
position: relative;
width: +100px; /* plus sign is allowed */
height: +100px;
padding: 100px;
padding: -0px; /* Minus sign is allowed for zero */
background: rgba(0,0,+255,1); /* plus sign is allowed */
}
@kizu
kizu / dabblet.css
Created September 13, 2016 09:04
Pooparty - view in Chrome for the full effect
/**
* Pooparty - view in Chrome for the full effect
*/
@keyframes poop-dance {
from, 49% { transform-origin: -50% 100%; }
50%, 75%, to { transform-origin: 150% 100%; }
25% { transform: rotate(-10deg); }
50% { transform: rotate(0deg); }
75% { transform: rotate(10deg); }
@kizu
kizu / dabblet.css
Created September 13, 2016 08:44 — forked from LeaVerou/dabblet.css
Pooparty - view in Chrome for the full effect
/**
* Pooparty - view in Chrome for the full effect
*/
@keyframes poop-dance {
from, 49% { transform-origin: -50% 100%; }
50%, 75%, to { transform-origin: 150% 100%; }
25% { transform: rotate(-10deg); }
50% { transform: rotate(0deg); }
75% { transform: rotate(10deg); }