// Getting a CSS Variable's Value
getComputedStyle(document.documentElement) // or specific element
.getPropertyValue('--my-variable-name'); // #999999
// Setting a CSS Variable's Value
document.documentElement.style // or specific element
.setProperty('--my-variable-name', 'pink');
// OR
var root = document.querySelector(':root'); // = document.documentElement
/* https://stackoverflow.com/questions/2797091/css-and-and-or */
/* or || */
.registration_form_right input:not([type="radio"]):not([type="checkbox"]) {}
/* and && */
.registration_form_right input:not([type="radio"]),
.registration_form_right input:not([type="checkbox"])
/* https://davidwalsh.name/external-links-css */
/* long version */
a[href^="http://"]:not([href*="mysite.com"]),
a[href^="https://"]:not([href*="mysite.com"]),
a[href^="//"]:not([href*="mysite.com"]), {
}
/* shorter version! */
a[href*="//"]:not([href*="mysite.com"]) {
/* external link styles, use :before or :after if you want! */
}
.full-width {
left: 50%;
margin-left: -50vw;
margin-right: -50vw;
max-width: 100vw;
position: relative;
right: 50%;
width: 100vw;
}
.full-width2 {
width: 100vw;
position: relative;
left: 50%;
transform: translateX(-50%);
background: coral;
}
.full-width3 {
/* max-width: 100vw; */
width: 100vw;
margin-left: 50%;
transform: translateX(-50%);
background: lime;
}
/* https://coryrylan.com/blog/css-gap-space-with-flexbox */
.emulated-flex-gap {
--gap: 12px;
display: inline-flex;
flex-wrap: wrap;
margin: calc(-1 * var(--gap)) 0 0 calc(-1 * var(--gap));
width: calc(100% + var(--gap));
}
.emulated-flex-gap > * {
margin: var(--gap) 0 0 var(--gap);
}
<!-- DEMO: http://kod.djpw.cz/ilcd -->
<div class="row">
<div class="content">
obsah row <br>
</div>
<div class="overlay">
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
</div>
</div>
<div class="row">
<div class="content">
obsah row<br>
obsah row<br>
obsah row<br>
obsah row<br>
obsah row<br>
obsah row<br>
obsah row<br>
obsah row<br>
obsah row<br>
obsah row<br>
</div>
<div class="overlay">
<div>1</div>
</div>
</div>
/* https://www.zachleat.com/web/fluid-images/ */
img {
max-width: 100%;
}
img[width] {
width: auto; /* Defer to max-width */
}
img[width][height] {
height: auto; /* Preserve aspect ratio */
}
/* Let SVG scale without boundaries */
img[src$=".svg"] {
width: 100%;
height: auto;
max-width: none;
}
<!-- https://jsbin.com/bowaxu/1/edit?html,css,output -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<a href="" class="button"><span class="button-text"></span></a>
</body>
</html>
#https://jsbin.com/tedukoyara/edit?css,output
section
{
height: 600px;
border: 1px solid blue;
background:
url(https://www.flaticon.com/svg/static/icons/svg/3823/3823859.svg) right bottom / 100px no-repeat,
url(https://www.flaticon.com/svg/static/icons/svg/3823/3823866.svg) left top / 100px no-repeat,
url(https://www.flaticon.com/svg/static/icons/svg/3823/3823855.svg) 50% / 100px no-repeat;
}