Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions sprint2/css/login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
@charset "utf-8";
@font-face {
font-family: 'Pretendard-Regular';
src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
}

* {
margin: 0;
padding: 0;
}

body{
font-family: 'Pretendard-Regular';
font-size: 16px;
}
Comment on lines +9 to +17
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

용도에 따라 CSS 파일을 구분해서 써볼까요?

  • reset.css : CSS 초기화
  • common.css: 전역 스타일 처리


#wrap {
border: border-box;
}
/* -------------------- logo -------------------------- */
#login_main {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
Comment on lines +26 to +28
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 자주 사용되는 스타일 블락들은 유틸리티 클래스로 만들어서 재사용해주면 코드 중복이 줄어들어서 더 괜찮겠죠?

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

}

#login_main .container {
width: 640px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.logo {
margin-bottom: 40px;
}

/* -------------------- login_form -------------------------- */
#login_form {
width: 100%;
}

#login_form .contents {
width: 100%;
display: flex;
flex-direction: column;
gap: 24px;
}

.from_ctrl label {
display: block;
margin-bottom: 16px;
font-size: 18px;
font-weight: 700;
color: var(--gray800);
}

input{
border: none;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 초기화 코드는 제가 코멘트드린것처럼 reset.css 파일에서 선언하고 재사용하면 매번 다시 코드를 반복할 필요가 없어질거예요 :)

box-sizing: border-box;
}

.from_ctrl input {
width: 100%;
height: 56px;
padding: 16px 24px;
font-size: 16px;
background-color: var(--gray100);
border-radius: 12px;
}

.ctrl_wrap {
position: relative;
}

.btn_off, .btn_on {
border: none;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요것도 마찬가지! reset.css 파일에서 기본 스타일을 초기화해주면 따로 써줄 필요가 없어지겠죠?

position: absolute;
top: 50%;
transform: translatey(-50%);
right: 24px;
cursor: pointer;
}

.login_btn {
border: 0;
background-color: var(--blue);
color: #ffffff;
font-size: 20px;
font-weight: 600;
padding: 12px 0;
border-radius: 40px;
cursor: pointer;
}

.login_btn:hover {
background-color: var(--hover-color);
}

.login_btn:active {
background-color: var(--click-color);
}

.easy_login {
display: flex;
justify-content: space-between;

width: 100%;
height: 74px;
padding: 16px 24px;
background-color: var(--background-blue);

font-size: 16px;
font-weight: 500;
border-radius: 8px;
box-sizing: border-box;
align-items: center;
}

.easy_login_icon a{
display: inline-block;
padding-left: 16px;
}
/* ------------------------------------------------ */
.first_signup {
display: flex;
justify-content: center;
gap: 4px;

font-size: 14px;
font-weight: 500;
color: var(--gray800);
}

.first_signup a {
color: var(--blue);
text-decoration: underline;
}
52 changes: 52 additions & 0 deletions sprint2/css/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
*{
margin: 0;
padding: 0;
}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
text-decoration: none;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
142 changes: 142 additions & 0 deletions sprint2/css/signup.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
@charset "utf-8";
@font-face {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

font 최적화를 시도할수있겠군요!
아래 아티클 참고해보시고, font-display 속성도 건드려볼까요?

참고

font-family: 'Pretendard-Regular';
src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
}

* {
margin: 0;
padding: 0;
}

body{
font-family: 'Pretendard-Regular';
font-size: 16px;
}

#wrap {
border: border-box;
}
/* -------------------- logo -------------------------- */
#login_main {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}

#login_main .container {
width: 640px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
Comment on lines +23 to +37
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

signup.css에서 login 페이지에 관련된 CSS가 필요한 이유가 있을까요?


.logo {
margin-bottom: 40px;
}

/* -------------------- signup_form -------------------------- */
#signup_form {
width: 100%;
}

#signup_form .contents {
width: 100%;
display: flex;
flex-direction: column;
gap: 24px;
}

.from_ctrl label {
display: block;
margin-bottom: 16px;
font-size: 18px;
font-weight: 700;
color: var(--gray800);
}

input{
border: none;
box-sizing: border-box;
}

.from_ctrl input {
width: 100%;
height: 56px;
padding: 16px 24px;
font-size: 16px;
background-color: var(--gray100);
border-radius: 12px;
}

.ctrl_wrap {
position: relative;
}

.btn_off, .btn_on{
border: none;
position: absolute;
top: 50%;
transform: translatey(-50%);
right: 24px;
cursor: pointer;
}

.login_btn {
border: 0;
background-color: var(--blue);
color: #ffffff;
font-size: 20px;
font-weight: 600;
padding: 12px 0;
border-radius: 40px;
cursor: pointer;
}

.login_btn:hover {
background-color: var(--hover-color);
}

.login_btn:active {
background-color: var(--click-color);
}

.easy_login {
display: flex;
justify-content: space-between;
align-items: center;

width: 100%;
height: 74px;
background-color: var(--background-blue);

padding: 16px 24px;
border-radius: 8px;
box-sizing: border-box;
font-size: 16px;
font-weight: 500;
}

.easy_login_icon a{
display: inline-block;
padding-left: 16px;
}
/* ------------------------------------------------ */
.first_signup {
display: flex;
justify-content: center;
gap: 4px;
font-size: 14px;
font-weight: 500;
color: var(--gray800);
}

.first_signup a {
color: var(--blue);
text-decoration: underline;
}
Loading
Loading