Skip to content
Open

rwd #163

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
33 changes: 17 additions & 16 deletions 01/style.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
}

.content {
background-color: #fff;
min-height: 320px;
min-width: 320px;
max-width: 600px;
text-align: justify;
background-color: #fff;
min-height: 320px;
min-width: 320px;
max-width: 600px;
text-align: justify;
}

.content::before {
float: left;
display: block;
content: '';
height: 0;
border: 150px solid #dcdcdc;
border-right-color: transparent;
border-bottom-color: transparent;
}
float: left;
display: block;
content: '';
height: 0;
border: 150px solid #dcdcdc;
border-right-color: transparent;
border-bottom-color: transparent;
shape-outside: polygon(0 0, 0% 100%, 100% 0);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

}
18 changes: 9 additions & 9 deletions 02/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>devmentor.pl - HTML & CSS: RWD - #02</title>

<link rel="stylesheet" href="./styles/global.css">
</head>
<body>
<link rel="stylesheet" href="./styles/global.css" />
</head>
<body>
<header class="a">A</header>
<section class="c">C</section>
<main class="b">B</main>
</body>
</html>
</body>
</html>
57 changes: 44 additions & 13 deletions 02/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,57 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
flex-direction: column;
}
.a,
.b,
.c {
border: 3px solid transparent;
min-height: 50px;

.a, .b, .c {
border: 3px solid transparent;
min-height: 50px;
display: flex;
justify-content: center;
align-items: center;

display: flex;
justify-content: center;
align-items: center;
height: 50vh;
}

.a {
border-color: #ffffba
border-color: #ffffba;
}

.b {
border-color: #ffdfba;
border-color: #ffdfba;
}

.c {
border-color: #baffc9;
}
border-color: #baffc9;
order: 1;
}

@media screen and (min-width: 600px) {
body {
display: grid;

grid-template-areas:
'area-a area-a'
'area-c area-b';
grid-template-columns: minmax(auto, 600px) minmax(auto, 600px);
justify-content: center;
}
.a {
grid-area: area-a;
}

.b {
grid-area: area-b;
}

.c {
grid-area: area-c;
}
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

69 changes: 56 additions & 13 deletions 03/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,59 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>devmentor.pl - HTML & CSS: RWD - #03</title>
</head>
<body>

<main class="t">T</main>
<header class="p">P</header>
<side class="v">V</side>

</body>
</html>
<link rel="stylesheet" href="./styles/global.css" />
<link rel="stylesheet" href="./styles/reset.css" />
<link rel="stylesheet" href="./styles/mobile.css" />
<link
rel="stylesheet"
href="./styles/tablet.css"
media="(min-width:600px)"
/>
<link
rel="stylesheet"
href="./styles/desktop.css"
media="(min-width:1200px)"
/>
</head>
<body>
<main class="t">
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Praesentium
beatae maxime minus nulla ullam atque sint! Vero, officia ex soluta
maiores illo eveniet nesciunt labore neque repudiandae, ut necessitatibus
quo.
</main>
<header class="p">
<picture>
<source
media="(min-width:1200px)"
srcset="./styles/images/bird1920.jpg"
/>
<source
media="(min-width:600px)"
srcset="./styles/images/bird1280.jpg"
/>
<source
media="(max-width:599px)"
srcset="./styles/images/bird640.jpg"
/>
<img src="./styles/images/bird1920.jpg" />
</picture>
</header>
<side class="v"
><iframe
width="560"
height="315"
src="https://www.youtube.com/embed/jl_J7x0MULw?si=tyuHxbosMmvIh6Jh"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
></iframe
></side>
</body>
</html>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

9 changes: 9 additions & 0 deletions 03/styles/desktop.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
body {
display: grid;
grid-template-areas:
'area-p area-v'
'area-t area-t';

max-width: 1400px;
margin: 0 auto;
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

42 changes: 29 additions & 13 deletions 03/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,42 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
}

.p, .t, .v {
border: 3px solid transparent;
min-height: 50px;
.t,
.v {
border: 3px solid transparent;
min-height: 50px;

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

.p {
border-color: #ffffba
line-height: 0;

border-color: #ffffba;
grid-area: area-p;
}

.t {
border-color: #ffdfba;
border-color: #ffdfba;
grid-area: area-t;
}

.v {
border-color: #baffc9;
}
border-color: #baffc9;
position: relative;
height: 0;
padding-bottom: calc(100% * 315 / 560);
grid-area: area-v;
}
.v iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

Binary file added 03/styles/images/bird1280.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 03/styles/images/bird1920.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 03/styles/images/bird640.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions 03/styles/mobile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
body {
display: grid;
grid-template-areas:
'area-p'
'area-t'
'area-v';
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

89 changes: 89 additions & 0 deletions 03/styles/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, menu, nav, section, time, mark, audio, video, details, summary {margin: 0; padding: 0; border: 0; font-size: 100%; font-weight: normal; vertical-align: baseline; background: transparent;}

main, article, aside, figure, footer, header, nav, section, details, summary {display: block;}

html {box-sizing: border-box;}

*, *:before, *:after {box-sizing: inherit;}

img {max-width: 100%;}

ul {list-style: none;} /* we'll restore bullets as needed for content */

blockquote, q {quotes: none;}

blockquote:before, blockquote:after, q:before, q:after {content: ''; content: none;}

a {margin: 0; padding: 0; font-size: 100%; vertical-align: baseline; background: transparent;}

del {text-decoration: line-through;}

abbr[title], dfn[title] {border-bottom: 1px dotted #000; cursor: help;}

table {border-collapse: separate; border-spacing: 0; text-align: left;}
th {font-weight: bold; vertical-align: bottom;}
td {font-weight: normal; vertical-align: top;}
td img {vertical-align: top;}

hr {display: block; height: 1px; border: 0; border-top: 1px solid #999; margin: 1rem 0; padding: 0;}

input, select {vertical-align: middle;}

pre {white-space: pre-line;}

input[type="radio"] {vertical-align: text-bottom;}
input[type="checkbox"] {vertical-align: bottom;}

small {font-size: .8rem;}

strong {font-weight: bold;}

sub, sup {font-size: .8rem; line-height: 0; position: relative;}
sup {top: -0.5rem;}
sub {bottom: -0.25rem;}

pre, code, kbd, samp {font-family: monospace, sans-serif;}

label, input[type=button], input[type=submit], input[type=file], button {cursor: pointer;}

button, input, select, textarea {margin: 0;}

ins {background-color: var(--highlight-color); color: #000; text-decoration: none;}
mark {background-color: var(--highlight-color); color: #000; font-style: italic; font-weight: bold;}

blockquote {padding: 2rem; border-left: 1px solid #333;}

.clearfix:after {content: ""; display: table; clear: both;} /* https://css-tricks.com/snippets/css/clear-fix/ */

h1, h2, h3, h4, h5, h6 {text-wrap: balance}

p {text-wrap: pretty;}

@media (prefers-reduced-motion: no-preference) {
:has(:target) {
scroll-behavior: smooth;
}
}

/* ———— END THE GENERIC RESETS ———— */

:root {
--font-system: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; /* https://css-tricks.com/snippets/css/system-font-stack */
--text-color: #333;
--featured-color: #03f;
--featured-color-hover: #69f;
--highlight-color: #fcd700;
}

body {font-size: 16px; font-family: var(--font-system); color: var(--text-color);}

a {color: var(--featured-color);}
a:hover {color: var(--featured-color-hover);}

@media screen and (max-width: 480px) {

}

@media print {

}
8 changes: 8 additions & 0 deletions 03/styles/tablet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
body {
display: grid;
grid-template-areas:
'area-p area-t'
'area-v area-t';

grid-template-columns: minmax(200px, 50vw) auto;
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

👍

Loading