This file contains hidden or 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 solution(paramArr1, goal) { | |
| let result = 0; | |
| let lt = 0; | |
| let sum = 0; | |
| for (let rt = 0; rt < paramArr1.length; rt++) { | |
| sum += paramArr1[rt]; | |
| if (sum === goal) result++; | |
| while (sum >= goal) { |
This file contains hidden or 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
| /* responsive */ | |
| @media (min-width: 600px) { | |
| font-size: 1rem; | |
| } | |
| /* fluid */ | |
| font-size: clamp(1.5rem, 32px, 3rem); |
This file contains hidden or 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
| p { | |
| width: calc(50% - 20px); // can mix units | |
| } |
This file contains hidden or 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
| p { | |
| width: min(200px, 50%); | |
| height: max(200px, 50%); | |
| } |
This file contains hidden or 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
| p.original { | |
| width: 80%; | |
| min-width: 100px; | |
| max-width: 500px; | |
| } | |
| p.with-clamp { | |
| width: clamp(100px, 80%, 500px); | |
| } |
This file contains hidden or 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
| box-shadow: 0px 10px 10px -7px #4444dd; |
This file contains hidden or 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 first */ | |
| .box { | |
| transform: rotate(45deg); | |
| transition: transform 500ms; | |
| } | |
| @media (prefers-reduce-motion: reduce) { | |
| .box { | |
| transition: none; | |
| } |
This file contains hidden or 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
| .btn { | |
| will-change: transform; | |
| } |
This file contains hidden or 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
| license: gpl-3.0 |
This file contains hidden or 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
| license: gpl-3.0 |
NewerOlder