This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getRandomPositiveNumber = (from, to) => { | |
if (from === to) { | |
return from; | |
} | |
if (from <= 0 || to <= 0) { | |
return 0; | |
} | |
if (from > to) { | |
[from, to] = [to, from]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.animation { | |
animation: 4s linear 0s infinite alternate sun-rise; | |
} | |
@media (prefers-reduced-motion) { | |
.animation { | |
animation: none; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Fruit() { | |
if(!(this instanceof Fruit)) { | |
throw Error('Error: Incorrect invocation!'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ribbon { | |
--s: 70px; /* the ribbon size */ | |
--d: 20px; /* the depth */ | |
--c: 20px; /* the cutout part */ | |
padding: 0 calc(var(--s) + var(--d)) var(--d); | |
background: | |
conic-gradient(at left var(--s) bottom var(--d), | |
#0000 25%,#0008 0 37.5%,#0004 0) 0 /50% no-repeat, | |
conic-gradient(at right var(--s) bottom var(--d), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--lightsteelblue: hsl(214, 41%, 78%); | |
--steelblue: hsl(207, 44%, 49%); | |
--lightgray: hsl(0, 0%, 83%); | |
} | |
::-webkit-scrollbar { | |
width: 6px; | |
height: 6px; | |
background-color: var(--lightsteelblue); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.overflow-ellipsis { | |
overflow: hidden; | |
white-space: nowrap; | |
text-overflow: ellipsis; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input[type='search']::-webkit-search-decoration, | |
input[type='search']::-webkit-search-cancel-button, | |
input[type='search']::-webkit-search-results-button, | |
input[type='search']::-webkit-search-results-decoration { | |
display: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.fade-in-gradual { | |
animation: 255ms ease 0s fadeInGradual both; | |
} | |
@keyframes fadeInGradual { | |
0% { | |
opacity: 0; | |
transform: translateY(-10px); | |
} | |
100% { |