Build a Responsive Website | HTML, CSS Grid, Flexbox & More 학습로그
:root {
--primary-color: #047aed;
}
/* Tablets and under 768px will be styled here*/
@media (max-width: 768px) {
/* stack grids elems one col */
.grid,
.showcase .grid,
.stats .grid,
.cli .grid,
.cloud .grid,
.features-main .grid,
.features-head .grid,
.features-sub-head .grid,
.docs-head .grid,
.docs-main .grid {
grid-template-columns: 1fr;
grid-template-rows: 1fr;
}
/* stacking every grid elem in a line */
.features-main .grid > *:first-child,
.features-main .grid > *:nth-child(2) {
grid-column: 1;
}
}
@media (max-width: 500px) {
.navbar {
height: 110px;
}
.navbar .flex {
flex-direction: column;
}
.navbar ul {
padding: 10px;
background-color: rgba(0, 0, 0, 0.1); /*blackish transparent bg*/
}
}
.languages .flex {
flex-wrap: wrap; /* flex cards rearranged by browser width */
}
.languages .card {
text-align: center;
margin: 18px 10px 40px;
transition: transform 0.2s ease; /* add smoothe anime to transform on hover */
}
.cli .grid {
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr); /* this makes another row */
}
/* Utils */
.container {
/* inserting container with max width */
max-width: 1100px;
margin: 0 auto;
overflow: auto; /* to get rid of top margin cause by h1 margin-top: 10px*/
padding: 0 40px; /* gives space between h1 and container */
}
.card {
background-color: #fff;
color: #333;
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); /* simulates pop-up like visual */
padding: 20px;
margin: 10px;
}
.btn {
display: inline-block; /* button is inline by default */
padding: 10px 30px;
cursor: pointer;
background-color: var(--primary-color);
color: #fff;
border: none;
border-radius: 5px;
}
.btn-outline {
background-color: transparent;
border: 1px #fff solid;
}
.btn:hover {
transform: scale(0.98);
}
.bg-primary,
.btn-primary {
background: var(--primary-color);
color: #fff;
}
.bg-secondary,
.btn-secondary {
background: var(--secondary-color);
color: #fff;
}
/* text colors */
.text-primary {
color: var(--primary-color);
}
.text-dark {
color: var(--dark-color);
}
/* text sizes */
.lead {
font-size: 20px;
}
.sm {
font-size: 1rem;
}
.xl {
font-size: 4rem;
}
.text-center {
text-align: center;
}
.alert {
background-color: var(--light-color);
padding: 10px 20px;
font-weight: bold;
margin: 15px 0;
}
.alert i {
margin-right: 10px;
}
.alert-success {
background-color: var(--success-color);
color: white;
}
.flex {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
height: 100%; /* height must be specifed to get aligned vertically*/
justify-content: center;
align-items: center;
}
.grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
height: 100%; /* height must be specifed to get aligned vertically*/
justify-content: center;
align-items: center;
}
/* Margin */
.my-1 {
margin: 1rem 0;
}
.my-2 {
margin: 1.5rem 0;
}
.m-1 {
margin: 1rem;
}
.m-2 {
margin: 1.5rem;
}
# fork and cloning to local env
gh repo fork https://github.com/codestates-beb/im-sprint-query-selector
# make some changes... such as
echo "change1" >> created_file.txt
git add .
git commit -m "commit for pull request"
git push
gh pr create # follow cli instructions
gh pr close prNumber # close pr
gh pr list # 목록보기
gh pr comment prNumber # 댓글달기
gh pr edit # 제목, 내용 등 변경하기
gh pr checkout prNumber # git checkout