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

Add close link to alerts #4

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 30, 2013

"Closeable" alerts (ones that the user can close with a click) are useful so I decided to add them in - they are in pure CSS. With that, I needed to remove the need for a p element inside the alert div a la Foundation 5. Only 0.153 kb bigger than the original .min.css file. So now alerts are created like this:

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

and closeable ones like this:

<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>

See a live example at rafalchmiel.com/bijou.

Also trimmed trailing whitespace in the files I have edited because my editor did so automatically.

@ricci69
Copy link

ricci69 commented Jan 2, 2014

A very very good idea!

@ghost
Copy link
Author

ghost commented Jan 2, 2014

This probably isn't the best implementation (I haven't done CSS for a while now) - you might want to try a different approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant