Skip to content

Instantly share code, notes, and snippets.

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) {
/* responsive */
@media (min-width: 600px) {
font-size: 1rem;
}
/* fluid */
font-size: clamp(1.5rem, 32px, 3rem);
p {
width: calc(50% - 20px); // can mix units
}
p {
width: min(200px, 50%);
height: max(200px, 50%);
}
p.original {
width: 80%;
min-width: 100px;
max-width: 500px;
}
p.with-clamp {
width: clamp(100px, 80%, 500px);
}
box-shadow: 0px 10px 10px -7px #4444dd;
@sundicide
sundicide / css-prefers_reduce_motion.css
Last active March 29, 2022 03:16
Medium / [CSS를 배워보자 #1] Animations - 02
/* animation first */
.box {
transform: rotate(45deg);
transition: transform 500ms;
}
@media (prefers-reduce-motion: reduce) {
.box {
transition: none;
}
@sundicide
sundicide / will-change-transform.css
Last active March 29, 2022 01:17
Medium / [CSS를 배워보자 #1] Animations - 02
.btn {
will-change: transform;
}
@sundicide
sundicide / .block
Created September 22, 2017 07:51 — forked from mbostock/.block
Axis Styling II
license: gpl-3.0
@sundicide
sundicide / .block
Last active September 23, 2017 03:29 — forked from mbostock/.block
Axis Styling
license: gpl-3.0