Skip to content

Instantly share code, notes, and snippets.

@KarafiziArtur
Created February 3, 2017 14:48
Show Gist options
  • Save KarafiziArtur/b7cf4a1e7dedef4e80a1d1726c9cbedd to your computer and use it in GitHub Desktop.
Save KarafiziArtur/b7cf4a1e7dedef4e80a1d1726c9cbedd to your computer and use it in GitHub Desktop.
Base CSS file for "mobile first" coding
/* сброс стилей браузера */
* { box-sizing: border-box; }
html, body, div, span, 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%;
vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1.2;
}
ol {
padding-left: 1.4em;
list-style: decimal;
}
ul {
padding-left: 1.4em;
list-style: square;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* конец кода сброса стилей браузера */
/* стили для мобильных устройств и базовые стили для всех устройств */
body {
/* свойства тела страницы */
}
/* только для устройств со средним размером экрана */
@media (min-width: 481px) and (max-width:768px) {
body {
/* только для планшетов */
}
}
/* только для устройств с крупным размером экрана */
@media (min-width:769px) {
body {
/* только для компьютеров */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment