Sunday, June 26, 2022
  • Home
  • Event
  • Technology
  • Program
  • Education
No Result
View All Result
E-Capitals
No Result
View All Result
Home Program

Personalize it! – CSS-Tricks

admin by admin
December 23, 2021
in Program
0
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

Ensuring accessibility is a clear path to making your website better. When you make your site accessible, you grow your audience, improve the experience for all people using it (not just those with accessibility needs), and you get SEO benefits as well.

Related Posts

Single Element Loaders: The Bars | CSS-Tricks

Different Ways to Write CSS in React | CSS-Tricks

How to Become a Software Developer Fast?

CCNA vs CCNP – Detailed Guide and Differences

Along the same lines, preference-query customization is another great opportunity to give your users a personalized experience that speaks to them and is more enjoyable to use.

One preference query you can take advantage of is prefers-reduced-motion. This preference means that your users would prefer a web experience without flashy, quick animations. You can write your styles in a way that supports this preference, and then write a media query for those who don’t have this preference set to get your “louder” interactive experience:

Another preference to consider is a user’s preferred color scheme. While most sites today use a light theme by default, dark themes have been a top request over the past few years, especially for browsing the web at night. Providing a customized theming that aligns with your user’s preferences is another way to improve your user’s experience. 

You can do this efficiently by using CSS custom properties, and adjusting those custom property values with the prefers-color-scheme media feature. If you use general values like background, text, and highlight, you can update your values all in one place.

Don’t forget to use the color-scheme property as well to automatically get some theme conversion from the browser. Setting this property tells the browser what color themes (light, dark, or both) the page supports. In turn, the browser will automatically convert form controls and browser UI like scrollbars to the correct theme as well:

In this demo, even though I’m not setting the text color for my color themes, since I told the browser the site supports both light and dark themes with color-scheme: light dark in the :root, it automatically switches the typeface from black to white.

You can test your dark theme without changing your system settings in Chrome DevTools under the “Rendering” panel. This illustration shows the site houdini.how in its dark mode:

Another bonus to creating a dark theme is the battery life savings you’re providing your users. In  a Pixel 6 Lab study, it was found that for an OLED screen, a dark theme saves 11% in power consumption. 

So now you’re respecting your user’s accessibility needs, preferences, and battery life, which is a pretty great way to make your website better for your users.

Next Post

How Cannabis-infused Beverage Brand Cann Uses Sampling Events to Torch Category Stigmas – Event Marketer

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Posts

Technology

Amazon, robots, and diverging views of automation and the future of work – GeekWire

by admin
June 25, 2022
0

Tye Brady, Amazon Robotics chief technologist, with Digit, a bipedal warehouse robot developed by Agility Robotics, a company in which...

Read more

Amazon, robots, and diverging views of automation and the future of work – GeekWire

Univ. of Washington spinout aims to eliminate ‘forever chemicals’ with destruction tech system – GeekWire

Microsoft hires cloud security VP; Expedia board member resigns; and more – GeekWire

Teachers Share the Unwritten Rules of Teaching

Single Element Loaders: The Bars | CSS-Tricks

New Web3 video game from ‘Days Gone’ director set in post-apocalyptic Pacific Northwest – GeekWire

Load More

Popular Posts

Best Winter Olympics Activities for Kids in the Classroom

by admin
January 19, 2022
0

What is Packet Sniffing Attack? – Types and How to Prevent It?

by admin
December 11, 2021
0

Zain Nadella, 1996-2022: Microsoft CEO’s son remembered for love of music, bright smile, profound impact on his dad

by admin
March 1, 2022
0

Copyright © 2021 - e-Capitals.com DESIGNED AND DEVELOPED BY TEAM WORDPRESS BLOGX

No Result
View All Result
  • Home
    • Home 1
    • Home 2
    • Home 3
  • Event
  • Technology
  • Program
  • Education

Copyright © 2021 - e-capitals.com - DESIGNED AND DEVELOPED BY TEAM WORDPRESS BLOGX