maintainablecss.com's Introduction
maintainablecss.com's People
maintainablecss.com's Issues
Wrong link
In 7th chapter the link to ARIA attribute
documentation is wrong.
MaintainableCSS as a PDF
Hello Adam,
I loved your webpage/book, but i found a little bit tedious that all chapters are different links with the index on the bottom.
I then created for myself a PDF version of your book.
I suggest that you offer this PDF as a downloadable version on your webpage, and maybe an option to see the whole document as a long webpage.
I hope this was useful
Thank you.
Instances of "Javascript" should be "JavaScript"
Thanks for your work.
[question] 10. Javascript: Classname instead globalState
When creating an element from a JS-Class, the current approach is to either use explicit module-class-names for every instance or absolute global state:
var module1Collapser = new Collapser(element1, {
cssHideClass: 'moduleA-isHidden'
});
var module2Collapser = new Collapser(element2, {
cssHideClass: 'moduleB-isHidden'
});
.moduleA-isHidden,
.moduleB-isHidden {
display: none;
}
.globalState-isHidden {
display: none;
}
But we already have a (JS) class name "Collapser", so the first thing I would concider is using that instead of global state.
/* selecting every "Collapser" instance that is hidden*/
.Collapser-isHidden {
display: none;
}
/* if a specific Collapser-instance should look differnt */
.collapserA-isHidden {
display: block;
height: 0;
}
Question:
Are there any arguments agains JS-Class-name instead global state (assuming global state can be used for really everything)?
Proposal:
Replace .globalState
with the js-class-name .Collapser
.
The Javascript chapter sais:
[…] the global class will be referenced from within […] However, this approach doesn't always make sense. We may have two different modules that behave the same, but look different, which is something we've discussed in State.
In State:
[…] whilst states might be common, associated styles might not. For example, an empty basket has a gray background, where as an empty search has an absolutely-positioned image.
What about reusing state?
Sometimes, we may in fact want to reuse state across modules or components. For example, toggling an element's visibility. This is discussed in more detail in the chapter entitled Javascript.
Duplicated word
In 6th chapter the word the
is duplicated in the sentense And the the CSS would be
.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.