Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fun Example Using Flexbox (and a few extra demos) #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Binary file added demos/zacks-examples/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions demos/zacks-examples/index-backgroundfun+recursion.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Element Query Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" type="text/css" href="styles-backgroundfun.css">

<script src="../../lib/element-queries.js"></script>
<script src="../../lib/parser.js"></script>

</head>

<body>
<h1>Playing Around</h1>
<p>Demo description</p>

<div class="container">
<div class="inner">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reiciendis rerum itaque nostrum suscipit magnam maiores doloribus cum, sint ullam perferendis dolorem officia harum ab esse labore nisi neque a numquam.</div>
</div>
</body>
</html>
28 changes: 28 additions & 0 deletions demos/zacks-examples/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Element Query Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" type="text/css" href="styles.css">

<script src="../../lib/element-queries.js"></script>
<script src="../../lib/parser.js"></script>

</head>

<body>

<div class="container">
<div class="widget">
<div class="widget_content">
<img src="image.png" alt="" class="widget_image" >
<div class="widget_text">I'm Zachary Brady, Partner and Director of Technology at Suits &amp; Sandals, LLC, drummer for the Brooklyn based band Cunk and the Moments of Wonder, and New Media artist.</div>
</div>
<div class="widget_btn"><a href="#">Read More</a></div>
</div>
</div>

</body>
</html>
11 changes: 11 additions & 0 deletions demos/zacks-examples/styles-backgroundfun.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.container {
background: red;
}

.inner {
background: green;
}

.container:media(min-width: 500px) > .inner {
background: red;
}
12 changes: 12 additions & 0 deletions demos/zacks-examples/styles-backgroundfun2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.container {
background: red;
width: 50%;
}

.inner {
background: green;
}

.container:media(min-width: 500px) > .inner {
background: red;
}
16 changes: 16 additions & 0 deletions demos/zacks-examples/styles-recursion.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.container {
background: red;
display: inline-block;
}

.inner {
width: 15em;
height: 15em;
background: red;
color: white;
}

.container:media(min-width: 10em) > .inner {
width: 5em;
background: green;
}
56 changes: 56 additions & 0 deletions demos/zacks-examples/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
* {
box-sizing: border-box;
}

body {
font-family: "Myriad Pro", sans-serif;

}

.container {
width: 50%;
max-width: 60em;
margin: 0 auto;
padding: 1em;
overflow: hidden;
}

.widget_image {
max-width: 100%;
margin: 0 auto;
display: block;
}

.widget_text {
background: #ffeeee;
border: #aa2323 0.25em solid;
padding: 1em;
}

.widget_btn a {
letter-spacing: 0.1em;
text-decoration: none;
text-align: center;
text-transform: uppercase;
color: #fff;
background: #aa2323;
padding: 0.5em 1em;
display: block;
}

.container:media(min-width:30em) .widget_content {
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-align-items: flex-end;
align-items: flex-end;
}

.container:media(min-width:30em) .widget_text {
border-bottom: none;
}

.container:media(min-width:30em) .widget_image {
width: 40%;
}