Friday, May 9, 2025
News PouroverAI
Visit PourOver.AI
No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
News PouroverAI
No Result
View All Result

Chris’ Corner: Real World CSS

March 25, 2024
in Cloud & Programming
Reading Time: 3 mins read
0 0
A A
0
Share on FacebookShare on Twitter


I found Lee Robinson’s perspective on How I’m Writing CSS in 2024 to be quite enjoyable. Instead of diving straight into tools and syntax, it prioritizes the user:

What does a great experience look like when loading stylesheets on a website?

Stylesheets should load quickly with small file sizes

Stylesheets should not re-download unless changed with proper caching headers

Page content should have minimal or no layout shifts

Fonts should load quickly and minimize layout shifts

I agree with this! The third point, and to some extent the fourth, are more related to JavaScript than CSS, but it’s a good starting point. I would also add “The page styles should not interfere with default accessibility”.

After considering these factors, the developer experience comes into play:

How can the developer experience of the styling tools we use help us create a better user experience?

Remove unused styles, minify, and compress CSS for smaller file sizes

Generate hashed file names for safe, immutable caching

Bundle CSS files together to reduce network requests

Avoid naming collisions to prevent visual regressions

How can the developer experience of the styling tools we use help us write more maintainable, enjoyable CSS?

Easily delete styles when removing corresponding UI code

Adhere to a design system or set of themes easily

Receive editor feedback with TypeScript support, autocompletion, and linting

Get tooling feedback in-editor to prevent errors (type checking, linting)

I appreciate how the developer experience focuses on making tasks easier that the user experience demands. I want all those features! Although I still have reservations about dealing with unused styles. Detecting unused styles accurately is challenging, and I’m cautious about tools making those decisions.

Lee’s top recommendations are CSS Modules, Tailwind, or StyleX (or vanilla CSS for simpler projects). These suggestions seem fair based on his experience and achieve the goals he outlined. Personally, I prefer the CSS Modules approach. It’s mostly vanilla CSS but with excellent scoping, integrates well with components, and is widely used.

Switching gears to the real-world application of writing CSS, Ahmad Shadeed delves deep into dissecting the TechCrunch Layout using modern techniques.

While it may seem like a simple three-column layout, each column presents unique challenges. The first is fixed, the main content is fluid with a maximum width, nested grids, and an overall maximum width. The third column involves absolute positioning, not to mention the five major breakpoints and complex footer. Ahmad explores five different approaches, settling on a CSS grid technique that he found easy to implement, though the column declarations suggest it was only easy after multiple iterations.

Ahmad’s ability to distill a complex layout into a few lines of CSS is truly remarkable. CSS is undeniably powerful, but is it easier? Geoff Graham believes so, citing that grouping styles, centering, translation, and spacing are all easier with CSS. Geoff mentions more benefits, emphasizing that CSS is easier to understand and execute.

Roman Komarov discusses The Shrinkwrap Problem, which may seem niche but poses an intriguing layout challenge. When content wraps, the element occupies all available width, leading to unexpected visual effects. Roman explores solutions like anchor positioning, a unique approach to address this issue. Despite the complexity, the use-cases Roman presents are practical and straightforward.

David Bushell’s article on button-specific CSS styles is both fun and enlightening.

Have you ever tapped repeatedly on a button only to unexpectedly zoom in on the page? This issue, seen in rewind and fast-forward buttons on audio players, can be resolved with touch-action.

David presents four other solutions that may have escaped your consideration.



Source link

Tags: ChrisCornercssRealWorld
Previous Post

How to Write An Effective Outline

Next Post

Best practices for building secure applications with Amazon Transcribe

Related Posts

Top 20 Javascript Libraries You Should Know in 2024
Cloud & Programming

Top 20 Javascript Libraries You Should Know in 2024

June 10, 2024
Simplify risk and compliance assessments with the new common control library in AWS Audit Manager
Cloud & Programming

Simplify risk and compliance assessments with the new common control library in AWS Audit Manager

June 6, 2024
Simplify Regular Expressions with RegExpBuilderJS
Cloud & Programming

Simplify Regular Expressions with RegExpBuilderJS

June 6, 2024
How to learn data visualization to accelerate your career
Cloud & Programming

How to learn data visualization to accelerate your career

June 6, 2024
BitTitan Announces Seasoned Tech Leader Aaron Wadsworth as General Manager
Cloud & Programming

BitTitan Announces Seasoned Tech Leader Aaron Wadsworth as General Manager

June 6, 2024
Copilot Studio turns to AI-powered workflows
Cloud & Programming

Copilot Studio turns to AI-powered workflows

June 6, 2024
Next Post
Best practices for building secure applications with Amazon Transcribe

Best practices for building secure applications with Amazon Transcribe

Terraform VMware Cloud Director Provider v3.12.0

Terraform VMware Cloud Director Provider v3.12.0

Google Updates Spam Policies To Redefine Helpful Content

Google Updates Spam Policies To Redefine Helpful Content

Leave a Reply Cancel reply

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

  • Trending
  • Comments
  • Latest
Is C.AI Down? Here Is What To Do Now

Is C.AI Down? Here Is What To Do Now

January 10, 2024
Porfo: Revolutionizing the Crypto Wallet Landscape

Porfo: Revolutionizing the Crypto Wallet Landscape

October 9, 2023
A Complete Guide to BERT with Code | by Bradney Smith | May, 2024

A Complete Guide to BERT with Code | by Bradney Smith | May, 2024

May 19, 2024
A faster, better way to prevent an AI chatbot from giving toxic responses | MIT News

A faster, better way to prevent an AI chatbot from giving toxic responses | MIT News

April 10, 2024
Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

November 20, 2023
Saginaw HMI Enclosures and Suspension Arm Systems from AutomationDirect – Library.Automationdirect.com

Saginaw HMI Enclosures and Suspension Arm Systems from AutomationDirect – Library.Automationdirect.com

December 6, 2023
Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

June 10, 2024
AI Compared: Which Assistant Is the Best?

AI Compared: Which Assistant Is the Best?

June 10, 2024
How insurance companies can use synthetic data to fight bias

How insurance companies can use synthetic data to fight bias

June 10, 2024
5 SLA metrics you should be monitoring

5 SLA metrics you should be monitoring

June 10, 2024
From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

June 10, 2024
UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

June 10, 2024
Facebook Twitter LinkedIn Pinterest RSS
News PouroverAI

The latest news and updates about the AI Technology and Latest Tech Updates around the world... PouroverAI keeps you in the loop.

CATEGORIES

  • AI Technology
  • Automation
  • Blockchain
  • Business
  • Cloud & Programming
  • Data Science & ML
  • Digital Marketing
  • Front-Tech
  • Uncategorized

SITEMAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2023 PouroverAI News.
PouroverAI News

No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing

Copyright © 2023 PouroverAI News.
PouroverAI News

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In