Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
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
191 changes: 119 additions & 72 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,80 +1,127 @@
<html>
<head>
<title>CSS skin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" rel="stylesheet" href="skin.css">
</head>
<body>
<div>
<section id="intro">
<h2 id="intro_heading">CSS Components</h2>
</section>
<section id="button">
<h2 id="button_heading">Button</h2>
<p>A button is most typically used to trigger a custom JavaScript action (e.g. fetch new results, open a dialog or expand a menu).</p>
<p>A button may also be used, without JavaScript, to submit or reset a form.</p>

<h3>Default Button</h3>
<p>Use the <span class="highlight">btn</span> class on a button element to create the default button.</p>
<p>On hover, the text in the button should <strong>not</strong> be underlined.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/button.png" />
</div>
<head>
<title>CSS skin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" rel="stylesheet" href="skin.min.css">
</head>

<h3>Primary Button</h3>
<p>Use the <span class="highlight">btn--primary</span> hierarchy modifier to create a primary button.</p>
<p>This means that you will use both <span class="highlight">btn</span> and <span class="highlight">btn--primary</span> classes.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn btn--primary">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/primary-button.png" />
</div>
<body>
<div>
<section id="intro">
<h2 id="intro_heading">CSS Components</h2>
</section>
<section id="button">
<h2 id="button_heading">Button</h2>
<p>A button is most typically used to trigger a custom JavaScript action (e.g. fetch new results, open a dialog
or expand a menu).</p>
<p>A button may also be used, without JavaScript, to submit or reset a form.</p>

<h3>Secondary Button</h3>
<p>Use the <span class="highlight">btn--secondary</span> hierarchy modifier to create a secondary button.</p>
<p>This means that you will use both <span class="highlight">btn</span> and <span class="highlight">btn--secondary</span> classes.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn btn--secondary">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/secondary-button.png" />
</div>
<h3>Default Button</h3>
<p>Use the
<span class="highlight">btn</span> class on a button element to create the default button.</p>
<p>On hover, the text in the button should
<strong>not</strong> be underlined.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/button.png" />
</div>

<h3>Large Button</h3>
<p>Use the <span class="highlight">btn--large</span> size modifier to create a large button.</p>
<p>This means that you will use both <span class="highlight">btn</span> and <span class="highlight">btn--large</span> classes.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn btn--large">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/large-button.png" />
</div>
<h3>Primary Button</h3>
<p>Use the
<span class="highlight">btn--primary</span> hierarchy modifier to create a primary button.</p>
<p>This means that you will use both
<span class="highlight">btn</span> and
<span class="highlight">btn--primary</span> classes.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn btn--primary">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/primary-button.png" />
</div>

<h3>Extra-Large Button</h3>
<p>Use the <span class="highlight">btn--extra-large</span> size modifier to create an extra large button.</p>
<p>This means that you will use both <span class="highlight">btn</span> and <span class="highlight">btn--extra-large</span> classes.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn btn--extra-large">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/extra-large-button.png" />
</div>
<h3>Secondary Button</h3>
<p>Use the
<span class="highlight">btn--secondary</span> hierarchy modifier to create a secondary button.</p>
<p>This means that you will use both
<span class="highlight">btn</span> and
<span class="highlight">btn--secondary</span> classes.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn btn--secondary">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/secondary-button.png" />
</div>

<h3>Large Button</h3>
<p>Use the
<span class="highlight">btn--large</span> size modifier to create a large button.</p>
<p>This means that you will use both
<span class="highlight">btn</span> and
<span class="highlight">btn--large</span> classes.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn btn--large">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/large-button.png" />
</div>

<h3>Extra-Large Button</h3>
<p>Use the
<span class="highlight">btn--extra-large</span> size modifier to create an extra large button.</p>
<p>This means that you will use both
<span class="highlight">btn</span> and
<span class="highlight">btn--extra-large</span> classes.</p>
<div class="demo">
<p>It currently looks like this: </p>
<button class="btn btn--extra-large">Button</button>
</div>
<div class="expected">
<p>It should eventually look like this: </p>
<img src="./img/extra-large-button.png" />
</div>

</section>

<section id="form">
<form>
<input placeholder="Enter your email...">
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</form>
</section>

<section id="lists">
<ul class="list--unordered-row">
<li>Hola</li>
<li>Hi</li>
<li>Bonjour</li>
<li>Dzień Dobry!</li>
</ul>

<ul class="list--unordered-column">
<li>Uno</li>
<li>One</li>
<li>Un</li>
<li>jeden</li>
</ul>
</section>

</div>
</body>

</section>
</div>
</body>
</html>
99 changes: 86 additions & 13 deletions skin.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,86 @@
.highlight {
background-color: #ddd;
}

button.btn {
border-radius: 3px;
border-style: solid;
border-width: 1px;
font-weight: normal;
line-height: 1.15;
text-align: center;
vertical-align: middle;
}
.btn {
border-radius: 4px;
font-size: 1rem;
padding: 15px 65px;
color: #0554ba;
background-color: white;
}

.btn--primary {
border-radius: 4px;
font-size: 1rem;
padding: 15px 65px;
color: #0554ba;
background-color: white;
background-color: #0554ba;
color: white;
}

.btn--secondary {
border-radius: 4px;
font-size: 1rem;
padding: 15px 65px;
color: #0554ba;
background-color: white;
background-color: #f7f6f5;
color: #5c5f68;
}

.btn--large {
border-radius: 4px;
font-size: 1rem;
padding: 15px 65px;
color: #0554ba;
background-color: white;
padding-left: 100px;
padding-right: 100px;
font-size: 1.2rem;
}

.btn--extra-large {
border-radius: 4px;
font-size: 1rem;
padding: 15px 65px;
color: #0554ba;
background-color: white;
padding-left: 140px;
padding-right: 140px;
font-size: 1.6rem;
}

input {
border-radius: 4px;
min-height: 40px;
font-size: 1rem;
text-align: center;
border: 1px solid lightgrey;
display: block;
margin-bottom: 10px;
min-width: 300px;
}

select {
border-radius: 4px;
font-size: 0.8rem;
text-align: center;
border: 1px solid transparent;
-webkit-appearance: menulist-button;
width: 100%;
max-width: 300px;
text-align: center;
height: 30px;
background-color: #f7f4f4;
box-shadow: 1px 1px 2px rgba(5, 84, 186, 0.3);
}

.list--unordered-row {
display: flex;
flex-direction: row;
justify-content: space-around;
}

.list--unordered-column {
display: flex;
flex-direction: column;
justify-content: space-around;
}
1 change: 1 addition & 0 deletions skin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 88 additions & 0 deletions skin.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// Base button style
@mixin baseButton {
border-radius: 4px;
font-size: 1rem;
padding: 15px 65px;
color: #0554ba;
background-color: white;
}

.btn {
@include baseButton;
}

.btn--primary {
@include baseButton;
background-color: #0554ba;
color: white;
}

.btn--secondary {
@include baseButton;
background-color: #f7f6f5;
color: #5c5f68;
}

.btn--large {
@include baseButton;
padding-left: 100px;
padding-right: 100px;
font-size: 1.2rem;
}

.btn--extra-large {
@include baseButton;
padding-left: 140px;
padding-right: 140px;
font-size: 1.6rem;
}

//styles for a from input and dropdown select and a couple of more elements,
//ul horizontally and ul vertically

@mixin inputComp {
border-radius: 4px;
min-height: 40px;
font-size: 1rem;
text-align: center;
border: 1px solid lightgrey;
display: block;
margin-bottom: 10px;
min-width: 300px;
}

input {
@include inputComp;
}

@mixin selectComp {
border-radius: 4px;
font-size: 0.8rem;
text-align: center;
border: 1px solid transparent;
-webkit-appearance: menulist-button;
width: 100%;
max-width: 300px;
text-align: center;
height: 30px;
background-color: #f7f4f4;
box-shadow: 1px 1px 2px rgba($color: #0554ba, $alpha: 0.3);
}

select {
@include selectComp;
}

@mixin listUnordered($flex-direction) {
display: flex;
flex-direction: $flex-direction;
justify-content: space-around;
}

.list--unordered-row {
@include listUnordered(row);
}

.list--unordered-column {
@include listUnordered(column);
}