๐ฉ๐ป๐ปSTUDY (78) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ [Git] ์ ์ฅ์์ ๋ฐ๋ฅธ ๊ธ๋ก๋ฒ, ๋ก์ปฌ ์ ์ ๋ณ๊ฒฝํ๊ธฐ ์ ์ฒด(global)์ ํด๋น ํ๋ก์ ํธ(local)์ ๋ง๋ ์ฌ์ฉ์ ์ด๋ฆ, ์ด๋ฉ์ผ์ ์ค์ ๊ณผ ์์ , ์ญ์ ๋ฅผ ์์๋ณด์. ๋จผ์ ๋ฑ๋ก๋ ์ด๋ฆ, ์ด๋ฉ์ผ ํ์ธ ์ ์ฒดํ์ธ $git config --list ์ด๋ฆ, ์ด๋ฉ์ผ ํ์ธ $git config user.name $git config user.email git global (์ ์ฒด) ํด๋น ํฐ๋ฏธ๋ ์ ์ฒด์ ์ผ๋ก ์ธ git account ์ค์ ๋ฐ ์์ $git config --global user.name "์ค์ ํ ์ด๋ฆ" $git config --global user.email "์ค์ ํ ์ด๋ฉ์ผ" git local (ํด๋น ํ๋ก์ ํธ) ํด๋น ํ๋ก์ ํธ์์๋ง ์ ์ฉํ git account ์ค์ (๋ค๋ฅธ ๊ณ์ ์ ์ ์ฅ์๋ฅผ ์จ์ผ ํ๋ ๊ฒฝ์ฐ) ๋ฐ ์์ ์ง์ ํ ์ ์ฅ์๋ก ์ด๋ ํ ํฐ๋ฏธ๋์ ์๋ ๋ช ๋ น์ด ์ ๋ ฅ $.. [JavaScript] ๋น๊ตฌ์กฐํ(๊ตฌ์กฐ๋ถํด) ํ ๋น ๋ณดํธ๋์ด ์๋ ๊ธ์ ๋๋ค. [HTML] <button> , <input type="button"> ์ฐจ์ด button ํ๊ทธ์ type ์์ฑ submit :: ํผ์ ์ ์ถํ๋ ์ด๋ฒคํธ๋ฅผ ๋ฐ์. reset :: ํผ์์ ์์ฑ๋ ๋ด์ฉ์ ์ด๊ธฐํ. button :: ๊ทธ ์์ฒด๋ก๋ ์๋ฌด๋ฐ ์ด๋ฒคํธ๊ฐ ์๊ณ , click์ด๋ฒคํธ์ ์ฐ๊ฒฐ์์ผ์ ์๋ฐ์คํฌ๋ฆฝํธ๋ฅผ ํ์ฉํ๋ ๋ฐฉ๋ฒ์ผ๋ก ๋ง์ด ์ฌ์ฉ. buttonํ๊ทธ type์ ๊ธฐ๋ณธ๊ฐ์ submit์ด๋ผ button์ด๋ผ๊ณ ๋ช ์ํด์ฃผ๋ ๊ฒ์ด ์ข๋ค. buttonํ๊ทธ๊ฐ ๋ฑ์ฅํ๊ธฐ ์ ์ ์ ์ฌ์ฉํด button๋์์ ๋์ ํ๋ค๊ณ ํ๋ค. button vs input buttonํ๊ทธ์ inputํ๊ทธ์ ํฐ ์ฐจ์ด์ ์ button์ ์ค์ค๋ก ๋ซ์ง ์๋ ํ๊ทธ์ด๊ณ , input์ ์ค์ค๋ก ๋ซ๋ ํ๊ทธ. button์ ํ์ ํ๊ทธ๋ค์ ์ถ๊ฐํ ์ ์๋ค.(input์ ์๋จ) buttonํ๊ทธ๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ button์ ์์์ผ๋ก imgํ๊ทธ ๋ฃ.. [JavaScript] e.target , e.currentTarget e.target , e.curentTarget ์ฐจ์ด์ ๊ฒฐ๋ก ๋ถํฐ ๋งํ์๋ฉด, e.target :: ์ค์ ์ด๋ฒคํธ๊ฐ ๋ฐ์ํ๋ ์์ (๋๋ง ์ด๋ฒคํธ ๋ฐ์) e.currentTarget :: ์ด๋ฒคํธ ๋ฆฌ์ค๋๊ฐ ๋ฌ๋ฆฐ ์์ (์์ ํด๋ฆญํด๋ ๋ถ๋ชจ๋ ์ด๋ฒคํธ ์์) outer inner button const outer = document.getElementById('outer'); const inner = document.getElementById('inner'); const button = document.getElementById('button'); function printLog(e) { const { target, e.currentTarget } = e; console.log(`target: ${target.id}, .. [HTML] table https://brunch.co.kr/@snclab/31 ํ์ ๋ด์ฉ์ ์ดํดํ๊ธฐ ์ฝ๊ฒ ์ ๊ณตํ๊ธฐ ์ค๋ฅ ์ ํ์ผ๋ก ์ดํด๋ณด๋ ์น ์ ๊ทผ์ฑ ์ง์นจ | ํ๋ ์ด๋ค ๋ด์ฉ์ ์ผ์ ํ ํ์๊ณผ ์์์ ๋ฐ๋ผ ์์ ๋ณด๊ธฐ ์ฝ๊ฒ ๋ํ๋ธ ๊ฒ์ ๋๋ค. ๊ทธ๋ฌ๋ฏ๋ก ์ฐ๋ฆฌ๊ฐ ํ๋ฅผ ๋ง๋ค ๋๋ ํ์ ์ผ์ ํ ํ์๊ณผ ์์๋ฅผ ์ ์ ์ brunch.co.kr ๋งํฌ์ ์ ๋ฆฌ ๋ฒํผ์ buttonํ๊ทธ. anchorํ๊ทธ๋ ํ์ด์ง ์ด๋. input์ label์ ๋งค์นญ ๋ชปํ ๋๋ title ์ฌ์ฉ. a๋งํฌ ํ ์คํธ์ aria-label="" a href="javascript:void(0)" ๋์ฒดํ ์คํธ๋ aria-label ์ ์ฉ. aria-label์ ์ฉ์ด ์๋ ์ sr-only ํด๋์ค ์ ์ฉ. .sr-only { position:absolute; overflow:hidden; width:1px; height:1px; margin:-1px; padding:0px; clip:rect(0,0,0,0); } ๋งํฌ์ ์ ํญ ํฌ์ปค์ค ์์น๋ก ๋ง๋ ๋ค.(ํ์ ์ ๋ซ๊ธฐ๋ฒํผ์ ๋ง์ง๋ง์ ์ ์ฉ๋์ผ ํจ) ๋ถํธ์คํธ๋ฉ์ ๋งํฌ์ ์น์ ๊ทผ์ฑ์ ์ฐธ๊ณ ํ๊ธฐ ์ข๋ค. Q. sr-only๊ฐ ์๋๋ฐ ์ font-size:0px์ ์ฌ์ฉํ ๊น?.. [SASS] @mixin @content @include ๐บ๋ฌธ์ @include ์ ์ธ ํ ์ถ๊ฐ ์คํ์ผ ์ง์ ์ด ์๋จ. parent์ child ์คํ์ผ ์ง์ ์๋จ. .parent { @include mix() { // ์คํ์ผ์ง์ } ( // Error ) // Error .child { } } html ๊ตฌ์กฐ BOX1 BOX2 BOX3 @mixin @mixin ๋ฏน์ค์ธ์ด๋ฆ($๋งค๊ฐ๋ณ์: ๊ธฐ๋ณธ๊ฐ) { ์คํ์ผ; } @include ๋ฏน์ค์ธ์ด๋ฆ(์ธ์); @content @mixin ๋ฏน์ค์ธ์ด๋ฆ() { ์คํ์ผ; @content; } @include ๋ฏน์ค์ธ์ด๋ฆ() { // ์คํ์ผ๋ธ๋ก ์คํ์ผ; } @mixin position( $p: absolute; $t: null, $b: null, $l: null, $r: null ) { position: $p; top: $t; bottom: .. [SASS] Node๋ก sass ์์ํ๊ธฐ 1. CLI๋ก sass ์ค์น Node.js ์ค์น๊ฐ ๋์ด ์์ด์ผ ๋จ. npm install sass -g ๋ก CLI ์ ์ค์น. 2. sass ๋ฒ์ ํ์ธ $ npm show sass version $ sass --version 3. ํด๋น ๋๋ ํ ๋ฆฌ์ scss -> css ๋ณํ $ sass style.scss style.css $ sass ์ ๋ ฅ. ํด๋ ์์ ์์ ๊ฒฝ์ฐ, $ sass scss/style.scss style.css 4. sass ๋ณด๊ธฐ , ๋๋ด๊ธฐ --watch๋ผ๋ ํ๋๊ทธ๋ฅผ ๋ฃ์ด ํด๋น ํ์ผ ์๋์ผ๋ก ๋ณํ. $ sass --watch style.scss:style.css ์๋์ฒ๋ผ ํด๋ ๋ด ๋ชจ๋ ํ์ผ๋ค์ ์ปดํ์ผํ ์ ์๋ค. sass --watch : $ sass --watch scss:css sass ์ค์.. ์ด์ 1 2 3 4 ยทยทยท 10 ๋ค์