aside 부분
outline-offset
aside{
margin-top: 1rem;
}
.side-box{
margin-bottom: 4rem;
border: 1px solid #ccc;
outline: 2px solid #ccc;
outline-offset: 4px;
border-radius: 6px;
padding: .875rem;
position: relative;
}
.side-box::before{
display: block;
width: 2rem; /* 16px(rem=기본은 16px, 상대적인 크기, 기준값이 있어야 한다) x 2 */
height: 2rem;
text-align: center;
background-color: #fff;
position: absolute;
top: -1rem;
left: 0;
right: 0;
margin: auto;
}
.side-box a:hover{
color: #7ac69f;
}
.side-box h3{
font-family: 'Amatic SC', cursive;
font-size: 1.875rem;
letter-spacing: .1rem;
text-align: center;
margin: .875rem 0 1.125rem;
}
목록 부분
/***************** 목록 ****************************/
.side-box li{
border-bottom: 1px dashed #ccc;
padding: 1rem .25rem;
display: flex;
}
.side-box li:last-child{
padding-bottom: .5rem;
border-bottom: 0;
}
.side-box li:first-child{
padding-top: 0;
}
.side-box li::before{
display: inline-block;
content: '';
background: #93d8d0;
width: 8px;
height: 8px;
border-radius: 50%;
margin: 6px 10px 0 0;
}
.side-box li a{
flex: 1; /* 비율 */
line-height: 1.4;
}
form 부분
/***************** 폼 *******************/
.newsletter-form{
display: flex;
margin-top: 1.5rem;
}
.newsletter-form input[type='email']{
border: 2px solid #ccc;
border-radius: 10px 0 0 10px;
background-color: #fff;
padding: 1rem;
width: 75%;
}
.newsletter-form input[type='email']:placeholder{
color: #ccc;
}
.newsletter-form input[type='submit']{
background-color: #eda1a1;
border-radius: 0 10px 10px 0;
color: #fff;
cursor: pointer;
padding: 1.1rem;
margin-left: -5px;
}
.newsletter-form input[type='submit']:hover{
background-color: #e38787;
}
popolar posts 부분
/******************* popular posts ******************/
.popular-posts{
margin-bottom: 2rem;
}
footer 부분
/************* footer ****************/
footer{
background-color: #949087;
text-align: center;
padding: 3rem;
}
footer ul{
display: flex;
justify-content: center;
margin-bottom: 2rem;
}
footer li{
margin: 0 12px;
}
footer a:hover{
color: #c7c3ba;
}
footer small{
color: #c7c3ba;
font-size: .875rem;
}
미디어쿼리 부분
/************ Desktop size *****************/
@media (min-width: 600px){
.container{
display: flex;
justify-content: space-between;
margin-bottom: 4rem;
padding: 1rem 2.5rem 2.5rem;
}
header{
height: 190px;
}
.page-title{
margin: 1rem 0 2rem;
}
.page-desc{
font-size: 1.125rem;
margin-bottom: 4rem;
}
section{
width: 68%;
margin-bottom: 0;
}
.post-thumb{
margin: 0 3rem 1.5rem 0rem;
shape-outside: circle();
float: left;
}
.post-img{
width: 220px;
height: 180px;
}
aside{
width: 26%;
}
.popular-posts{
position: sticky;
top: 1rem;
}
}

커스텀 속성(변수)과 조합
:root{
--number: 500;
}
div{
background-color: #0bd;
height: calc(100vh - 100px);
width: calc(var(--number) * 1px);
padding: 16px;
}
p{
/* --number: 500; number라는 변수를 선언, 지정만 해놓는 것 *
width: calc(var(--number) * 1px);
background-color: red;
padding: 16px;
}
@mixin circle {
width: 80px;
height: 80px;
border-radius: 50%;
}
div { @include circle;}
@mixin circle($size:80px){
width: $size;
height: $size;
border-radius: 50%;
}
div {
@include circle(60px);
}
<div class="wrapper">
<div>3em 크기의 제목
<div>1.5em 크기의 텍스트
<div>16px 크기의 텍스트입니다.</div>
</div>
</div>
</div>
<img src="./images/account_circle_black_24dp.svg" width="48" height="48">
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24
24" height="24px" viewBox="0 0 24 24" width="24px"
fill="#000000"><g><rect fill="none" height="24"
width="24"/></g><g><path d="M12,2C6.48,2,2,6.48,2,12s4.48,10,10,10s10-
4.48,10-10S17.52,2,12,2z M12,6c1.93,0,3.5,1.57,3.5,3.5S13.93,13,12,13
s-3.5-1.57-3.5-3.5S10.07,6,12,6z M12,20c-2.03,0-4.43-0.82-6.14-
2.88C7.55,15.8,9.68,15,12,15s4.45,0.8,6.14,2.12
C16.43,19.18,14.03,20,12,20z"/></g></svg>