custom-reset 모음

js·2021년 11월 8일
0

css 모음

목록 보기
1/2

custom-reset.css

* {
  box-sizing: border-box;
}
a {
  text-decoration: none;
  color: inherit;
}
button, input {
  outline: none;
}
button, 
input[type=button], 
input[type=submit], 
input[type=reset] {
  cursor: pointer;
}
ol, ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
h1,h2,h3,h4,h5,h6 {
	line-height: 1.2em;
	font-weight: normal;
	margin-top: 0;
}

GlobalStyle.ts

import { createGlobalStyle } from "styled-components";

const GlobalStyle = createGlobalStyle`
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, menu, 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,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
  display: block;
}
/* HTML5 hidden-attribute fix for newer browsers */
*[hidden] {
    display: none;
}
menu, 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;
}
* {
  box-sizing: border-box;
}
body {
  font-weight: 300;
  font-family: 'Source Sans Pro', sans-serif;
  background-color:#000;
  color:#fff;
  line-height: 1.2;
}
a {
  text-decoration:none;
  color:inherit;
}
`;
export default GlobalStyle;

resetByClass.css

/* Reset body */
body {
    margin: 0;
    overflow-wrap: break-word;
}

/* Do not break Korean words */
:lang(ko) { word-break: keep-all; }

/* Reset img */
img {
    max-width: 100%;
    height: auto;
}

/* CSS Reset by [class] */
[class] {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none; /* ol, ul */
    border: 0; /* button, fieldset, iframe, input, select, table, textarea */
    background-color: transparent; /* button, dialog, mark, meter, progress */
    border-collapse: collapse; /* table */
    border-spacing: 0; /* table */
    -webkit-appearance: none;
    appearance: none; /* button, input, meter, progress, select, textarea */
}
[class]::before,
[class]::after { box-sizing: border-box; }

/* CSS Reset by [class] - where() 선택자를 지원하는 프로젝트에서 아래 코드를 사용할 수 있음.
[class] {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
[class]::before,
[class]::after { box-sizing: border-box; }
[class]:where(ol, ul) { list-style: none; }
[class]:where(button, fieldset, iframe, input, select, textarea) { border: 0; }
[class]:where(button, dialog, input, mark, meter, progress) { background-color: transparent; }
[class]:where(table) {
  border: 0;
  border-collapse: collapse;
  border-spacing: 0;
}
[class]:where(button, input, meter, progress, select, textarea) {
  -webkit-appearance: none;
  appearance: none;
}
*/

0개의 댓글