8 comments

[ 3.3 ms ] story [ 27.5 ms ] thread
I'm genuinely interested wether this is a sarcastic submission or actually serious!
It is a simple solution for very common problem: styling a CSS button. There are many CSS buttons libraries but they usually force you to use their style or size. That is why this is interesting and simple solution born with my necessity not to recode and reinvent the CSS button for every new project.
The "hard" part about styling buttons is making them look the same for <a>, <button>, <input>, which is solved like a million times.

Your solution only addresses <div>, which is a accessibility nightmare.

(comment deleted)
Pretty cool! Small thing: you should use button tags for the examples – you're losing a lot of built-in accessibility by using div tags (for instance keyboard navigation).

How does these handle being applied to anchor (a) tags? Some times you want links to appear as buttons :)

It also works with (a) tags: <a class="button btcolor pill" href="#"> Button Link</a> I need to add this in the examples.