DEV Community

Cover image for Bootstrap CSS is still the sh*t. But we can make it better.

Bootstrap CSS is still the sh*t. But we can make it better.

Weston Walker 📚 on July 01, 2022

Bootstrap is an amazing CSS framework for those who struggle with design, css, or need to build something quickly. But the Bootstrap components yo...
Collapse
 
jafuentest profile image
Juan A. Fuentest Torcat •

Very useful, I love how much the UI improves with very small but well thought changes. Great stuff for us full-stack devs that are too focused on logic and performance and miss the more important user experience

Collapse
 
neifranci profile image
NeilFranci •

This give me a flash back when I was a fresher, the manager was yelling at me when having no knowledge about the UI/UX and the he hire a designer and I learn so much about UI/UX so now I can understand what look good 👍

Collapse
 
vulcanwm profile image
Medea •

This is nice!

Collapse
 
witty_code profile image
witty code •

Thanks, this is great!

Regarding tables - I think you should add the id (or alternate row id) to the table to allow dynamic sorting of the table

Collapse
 
jacktneely profile image
Jack T. Neely •

Great stuff!

Collapse
 
victorio profile image
Vic •

Nice!

Collapse
 
sereneinserenade profile image
Jeet Mandaliya •

That is a great article @wes_walke

I totally see the point of shadows>borders.

what is the best way to translate shadows>border design when it comes to dark theme? White shadows look a bit off and black shadows aren't really providing the visual separation that borders provide in dark theme...

Collapse
 
wes_walke profile image
Weston Walker 📚 • • Edited

Hi Jeet!

Making something a lighter gray in dark mode gives the illusion of elevation. Spotify is a good example of this!

Collapse
 
sereneinserenade profile image
Jeet Mandaliya •

That's actually great advice, thank you!

Collapse
 
hobart2967 profile image
Marco Klein •

Some very cool tips, illustrated in a nice way :) thanks!

Collapse
 
ashleyjsheridan profile image
Ashley Sheridan •

A lot of these recommendations go against what would typically be advised to make content more accessible:

  1. This is actually very good advice, and makes those notifications more accessible. There are other enhancements that could be done too, but probably beyond your immediate point in your post.
  2. Removing the table headings makes the table more difficult to read, especially so if the table is large enough. Screen reader users may struggle even further. Also, removing the 'view' link forces an extra select step to view the (details?) of that user. The select action alone introduces many extra accessibility issues for keyboards users or those relying on speech actions.
  3. Secondary buttons need styles that indicate that they're buttons. Removing the background colour effectively makes it appear as text. With the text colour being pale enough to fail colour contrast requirements, it might actually not be very visible to some users at all. At the least, it needs to show the area which is interactive.
  4. We shouldn't ever remove labels. While some text might seem obvious in context for a sighted user, people don't always browse the web in the same way. Screen readers have a variety of methods to allow for navigation and interaction which might lead to some content being announced without the context of its surroundings, forcing the user to manually navigate forwards and backwards to gain that context. There are specific WAI guidelines that aim to ensure that things are labelled correctly on the web.
  5. Shadows might look better, but they are completely removed in High Contrast Mode. You can add a transparent border and set the foreground colour of the element to account for this, as borders do get displayed in HC mode, and the colour will be adjusted automatically (in most cases).
Collapse
 
gnio profile image
Gnio •

Love how much you take into account accessibility. Especially the high contrast part.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
wes_walke profile image
Weston Walker 📚 •

Thank you for that great analysis Ian!

Collapse
 
uiuxsatyam profile image
Satyam Anand •

Insightful !! Really loved how you showed that User Experience can be improved by few small tweaks.

Thanks for sharing the post. 👏

Collapse
 
akarachen profile image
AkaraChen •

Really nice 👍

Collapse
 
sehgalspandan profile image
Spandan Sehgal •

Nice post .
Keep up the good work 👏

Collapse
 
imonem profile image
imonem •

Good stuff especially the point regarding labels 😅😅😅

Collapse
 
popsam806 profile image
Popsam806 •

that's good

Collapse
 
desireebyrd profile image
desireebyrd • • Edited

honestly I just highly customize everything with every new site, nest my styles with SASS -- and only use bootstrap for the column and row functions. But I tend to agree with these ideas.

Collapse
 
andrewbaisden profile image
Andrew Baisden •

Nice improvements.

Collapse
 
wboswall profile image
William Boswall •

I totally agree.

Collapse
 
jacoblindev profile image
Jacob Lin •

Nice tips!