Skip to content

Instantly share code, notes, and snippets.

View meritt's full-sized avatar
🎯
Focusing

Alexey Simonenko meritt

🎯
Focusing
View GitHub Profile
@meritt
meritt / 1.css
Last active February 7, 2021 17:04
input:valid {
border-color: green;
}
input:invalid {
border-color: red;
}
/**
* 1. Переопределяет свойство `appearance`, заменяет `searchfield` в Safari и Chrome.
* 2. Переопределяет свойство `box-sizing`, заменяет `border-box` в Safari и Chrome.
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
box-sizing: content-box; /* 2 */
}
@meritt
meritt / better-webfont-loading-with-localstorage-and-woff2.js
Last active January 12, 2024 14:26
Улучшение загрузки веб-шрифтов с использованием localStorage и поддержкой формата WOFF2
// Этот скрипт должен быть размещён в <head> над всеми внешними объявлениями стилей (link[rel=stylesheet])
function loadFont(fontName, woffUrl, woff2Url) {
// 0. Многие неподдерживаемые браузеры должны останавливать работу тут.
var nua = navigator.userAgent;
var noSupport = !window.addEventListener // IE8 и ниже
|| (nua.match(/(Android (2|3|4.0|4.1|4.2|4.3))|(Opera (Mini|Mobi))/) && !nua.match(/Chrome/)) // Android Stock Browser до 4.4 и Opera Mini
if (noSupport) {
return;
}
@meritt
meritt / meritt.zsh-theme
Last active July 31, 2023 23:40
My ZSH theme
# vim:ft=zsh ts=2 sw=2 sts=2
#
# Based on Agnoster's Theme — https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts)
# [Solarized theme](https://github.com/altercation/solarized/)
# [iTerm 2](http://www.iterm2.com/)
### Segment drawing
function(kendo, _, $, Cloner) {
'use strict';
/**
* The component to make grid be able to edit inline
* @module gridinlineedit
*/
/**
* @class GridInlineEdit
p:not(.intro) {
font-weight: bold;
}
.parallax {
perspective: 1px;
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
}
.parallax__layer {
position: absolute;
top: 0;
@meritt
meritt / 1.css
Last active August 29, 2015 14:11
.error-default {
color: #f00;
border: 2px solid #fc0;
}
.error-special {
color: #f00;
border: 2px solid #fc0;
background-color: #fcc;
}
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
@meritt
meritt / table.css
Last active December 21, 2021 10:42 — forked from colintoh/table.css
table { display: table }
tr { display: table-row }
thead { display: table-header-group }
tbody { display: table-row-group }
tfoot { display: table-footer-group }
col { display: table-column }
colgroup { display: table-column-group }
td, th { display: table-cell }
caption { display: table-caption }