Skip to content

Instantly share code, notes, and snippets.

@Manyaka
Manyaka / outline.css
Last active January 10, 2022 17:44
outline
*,
*::before,
*::after {
outline-style: dashed;
outline-color: darkorange;
outline-width: 1px;
/*outline: darkorange dashed 1px;*/
}
@Manyaka
Manyaka / var.scss
Last active March 3, 2020 08:18
Адаптивность в em
//адаптивность
$breakpoint_mobile: 375px; //23.4em
$breakpoint_tablet: 768px; //48em
$breakpoint_desktop: 1200px; //75em
$breakpoint_1366: 1366px; //85em
$breakpoint_desktop: 1920px; //120em
$breakpoint_mobile: 23.4em; // 375px
$breakpoint_tablet: 48em; // 768px
$breakpoint_desktop: 75em; // 1200px
@Manyaka
Manyaka / css-and-svg-masks-ie9.markdown
Created January 20, 2020 08:50
CSS and SVG Masks: IE9+
@Manyaka
Manyaka / clearfix.css
Created January 16, 2020 13:43
clearfix
//сбрасывание флоатов, версия 2018 года
.clearfix() {
&::after {
content: '';
display: table;
clear: both;
}
}
@Manyaka
Manyaka / ellipsis.css
Last active April 27, 2021 08:32
Обрезание текста
.block {
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
@Manyaka
Manyaka / table.css
Last active December 8, 2019 13:37
table nums
.table {
font-variant-numeric: tabular-nums;
}
@Manyaka
Manyaka / style.css
Created November 1, 2019 13:06
How to break an image out of its parent container with CSS
.full-width {
left: 50%;
margin-left: -50vw;
margin-right: -50vw;
max-width: 100vw;
position: relative;
right: 50%;
width: 100vw;
}
@Manyaka
Manyaka / word-break.css
Last active March 22, 2021 14:26
word-break.css
.class {
/* word-break: break-all; */
word-break: break-word;
hyphens: auto;
}
@Manyaka
Manyaka / visually-hidden.css
Last active March 12, 2020 07:32
visually-hidden
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
border: 0 none;
clip-path: inset(100%);
/* clip: rect(0 0 0 0); устаревшее */
@Manyaka
Manyaka / DOM.js
Created September 19, 2019 10:42
Простенькая имитация ДОМ дерева
let html = document.children[0];
for (let i = 0; i < html.children.length; i++) {
let child = html.children[i];
console.log(child.tagName.toLowerCase());
for (let j = 0; j < child.children.length; j++) {
let innerChild = child.children[j];
console.log('|---' + innerChild.tagName.toLowerCase());
}