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

Add close link to alerts #4

Open
wants to merge 2 commits 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
23 changes: 18 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Example: http://andhart.github.io/bijou/

If you want to contribute ideas or see the roadplan, there's a Trello: https://trello.com/b/2Gklk2lG

Browser Support: Checked and tested in the latest Firefox, Safari, Chrome, and IE9+.
Browser Support: Checked and tested in the latest Firefox, Safari, Chrome, and IE9+.

###Navbar:

Expand Down Expand Up @@ -34,7 +34,7 @@ or a navbar with navigation:

```

Add a `fixed` class to the navbar to make it fixed to the top of the screen (Make sure you also add `margin-top:50px` to the body if you make it fixed).
Add a `fixed` class to the navbar to make it fixed to the top of the screen (Make sure you also add `margin-top:50px` to the body if you make it fixed).

***

Expand Down Expand Up @@ -84,9 +84,22 @@ Large buttons have the `large` class, while small have the `small` class. Easy,
###Alerts

```html
<div class='alert primary'><p>Test</p></div>
<div class='alert success'><p>Test</p></div>
<div class='alert danger'><p>Test</p></div>
<div class='alert primary'>Test</div>
<div class='alert success'>Test</div>
<div class='alert danger'>Test</div>
```

For alerts which can be hidden when clicked on, add the `closeable` class to the `div` and `<a href='#' class='close closeable'>&times;</a>` inside it.

```html
<div class='alert primary closeable'>
Test
<a href='#' class='close closeable'>&times;</a>
</div>
<div class='alert success closeable'>
Test
<a href='#' class='close closeable'>&times;</a>
</div>
```

***
Expand Down
2 changes: 1 addition & 1 deletion css/bijou.min.css

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

33 changes: 19 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ <h4 class='pull-left'>Bijou</h4>
</div>
</div>
<div class='container'>

<div class='banner row'>
<div class='span ten'>
<h4>A small (less than 2 kb) CSS framework</h4>
<a href='https://github.com/andhart/bijou'><button class='button primary small'>Get it on Github</button></a>
</div>
</div>

<h4 class='explainer'>THE GRID</h4>
<div class='grid'>
<div class='row'>
Expand Down Expand Up @@ -109,17 +109,17 @@ <h4 class='explainer'>THE GRID</h4>
</div>
<div class='divider'></div>
<h4 class='explainer'>TYPOGRAPHY</h4>

<h1>h1</h1>
<h2>h2</h2>
<h3>h3</h3>
<h4>h4</h4>
<h5>h5</h5>
<h6>h6</h6>

<div class='divider'></div>
<h4 class='explainer'>TABLES</h4>

<table class='table table-striped table-bordered'>
<thead>
<tr>
Expand Down Expand Up @@ -156,7 +156,7 @@ <h4 class='explainer'>TABLES</h4>
</tr>
</tbody>
</table>

<table class='table table-striped'>
<thead>
<tr>
Expand Down Expand Up @@ -193,7 +193,7 @@ <h4 class='explainer'>TABLES</h4>
</tr>
</tbody>
</table>

<table class='table table-bordered'>
<thead>
<tr>
Expand Down Expand Up @@ -232,21 +232,26 @@ <h4 class='explainer'>TABLES</h4>
</table>
<div class='divider'></div>
<h4 class='explainer'>BUTTONS</h4>

<button class='button danger large'>Hello World</button>
<button class='button primary large'>Hello World</button>
<button class='button success large'>Hello World</button>
<button class='button danger small'>Hello World</button>
<button class='button primary small'>Hello World</button>
<button class='button success small'>Hello World</button>

<div class='divider'></div>
<h4 class='explainer'>ALERTS</h4>

<div class='alert primary'><p>Test</p></div>
<div class='alert success'><p>Test</p></div>
<div class='alert danger'><p>Test</p></div>


<div class='alert primary'>Test</div>
<div class='alert success'>Test</div>
<div class='alert danger'>Test</div>

<div class='alert primary closeable'>
Test
<a href='#' class='close closeable'>&times;</a>
</div>

</div>
</body>
</html>
12 changes: 10 additions & 2 deletions scss/_alerts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@

/* ALERTS */

.alert{
.alert {
padding:15px;
margin:10px 0;
margin-bottom:1.11111rem;
border-radius:3px;
display:block;
position:relative;
&.primary{
background:lighten($primary, 40%);
border:1px lighten($primary, 30%) solid;
Expand All @@ -19,4 +22,9 @@
background:lighten($danger, 40%);
border:1px lighten($danger, 30%) solid;
}
}
.close {
float:right;
top:50%;
}
&.closeable:active, .closeable:active { display:none; }
}