

A trick to improve your class names
source link: https://freek.dev/1954-a-trick-to-improve-your-class-names
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A trick to improve your class names
Original – May 17th 2021 by Freek Van der Herten – 1 minute read
Sometimes it is not clear what the responsibility of a certain class is. This can be solved by adding a suffix to the class name.
Stay up to date with all things Laravel, PHP, and JavaScript.
Follow me on Twitter. I regularly tweet out programming tips, and what I myself have learned in ongoing projects.
Every two weeks I send out a newsletter containing lots of interesting stuff for the modern PHP developer.
Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.
Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.
Recommend
-
135
How to obfuscate CSS class names with React and Webpack
-
114
Spruce up Spruce up is a simple JavaScript function for conditionally and elegantly concatenate CSS classes. Spruce up supports: Primitives : Returns a string that is the result...
-
80
:point_up: Decider Apply CSS to React components conditionally, like a boss. className={ decide(styles, { header: true, mobile: props.isMobile, narrow: parseInt(props.width)...
-
16
Shafik Yaghmour Compiler Dev(LLDB) interested in C++, C, compilers and undefined behavior.
-
7
Represent State with HTML Attributes, Not Class Names How often have you seen markup like this? <a href="/page2/" class="nav-link active">Page 2</a> We have an anchor with two class...
-
15
Checking Tailwind Class Names at Compile Time with Rust 2022-02-21 At the end of my last post, “Frontend Rust Without Node”, I talked...
-
11
One weird trick to improve your website’s performance Posted December 5, 2021 by Nolan Lawson in performance, Web....
-
10
We all know that when writing JSX tags we need to use lowercase with native DOM elements such as <div/> and we need to capitalize our custom components like this<MyCustomComponent...
-
9
Injected class names: The C++ feature you didn’t even realize that you were using Raymond March 21st, 2022 ...
-
5
stop and go — New Go-playing trick defeats world-class Go AI—but loses to human amateurs Adversarial policy attacks blind spots in the AI—with broader implications than gam...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK