Skip to content

Instantly share code, notes, and snippets.

View Ruslan2230's full-sized avatar
๐Ÿ‘Œ
Live and learn

Ruslan Hrytsak Ruslan2230

๐Ÿ‘Œ
Live and learn
View GitHub Profile
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 3, 2018 08:39 — forked from csssecrets/dabblet.css
Diagonal stripes - linear-gradient() method
/**
* Diagonal stripes - linear-gradient() method
*/
background: linear-gradient(45deg,
#fb3 25%, #58a 0, #58a 50%,
#fb3 0, #fb3 75%, #58a 0);
background-size: 42.4px 42.4px;
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 3, 2018 08:37 — forked from csssecrets/dabblet.css
Vertical stripes
/**
* Vertical stripes
*/
background: linear-gradient(to right, #fb3 50%, #58a 0);
background-size: 30px 100%;
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 3, 2018 08:37 — forked from csssecrets/dabblet.css
Horizontal stripes
/**
* Horizontal stripes
*/
background: linear-gradient(#fb3 50%, #58a 0);
background-size: 100% 30px;
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 3, 2018 08:32 — forked from csssecrets/dabblet.css
Inner rounding
/**
* Inner rounding
*/
div {
outline: .6em solid #655;
box-shadow: 0 0 0 .4em #655; /* todo calculate max of this */
max-width: 10em;
border-radius: .8em;
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 2, 2018 22:07 — forked from csssecrets/dabblet.css
Flexible background positioning
/**
* Flexible background positioning
* via calc()
*/
div {
background: url(http://csssecrets.io/images/code-pirate.svg)
no-repeat bottom right #58a;
background-position: calc(100% - 20px) calc(100% - 10px);
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 2, 2018 22:06 — forked from csssecrets/dabblet.css
Flexible background positioning
/**
* Flexible background positioning
* via extended background-position
*/
div {
background: url(http://csssecrets.io/images/code-pirate.svg)
no-repeat bottom right #58a;
background-position: right 20px bottom 10px;
@Ruslan2230
Ruslan2230 / dabblet.css
Last active June 3, 2018 08:30 — forked from csssecrets/dabblet.css
Flexible background positioning
/**
* Flexible background positioning
* via extended background-position
*/
div {
background: url(http://csssecrets.io/images/code-pirate.svg)
no-repeat bottom right #58a;
background-origin: content-box;
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 2, 2018 21:58 — forked from csssecrets/dabblet.css
Multiple borders
/**
* Multiple borders
*/
div {
width: 100px;
height: 60px;
margin: 25px;
background: yellowgreen;
box-shadow: 0 0 0 10px #655,
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 2, 2018 21:43 — forked from csssecrets/dabblet.css
Translucent borders
/**
* Translucent borders
*/
body {
background: url('http://csssecrets.io/images/stone-art.jpg');
}
div {
border: 10px solid hsla(0,0%,100%,.5);
@Ruslan2230
Ruslan2230 / dabblet.css
Created June 2, 2018 19:35 — forked from LeaVerou/dabblet.css
Responsive tables with element()
/**
* Responsive tables with element()
* Pros: No markup changes, works with normal table markup, no content duplication
* Cons: element() is only implemented in Firefox :(
*/
@media (max-width: 600px) {
table, tr, td, th, thead, tbody {
display: block;
}