PML New Default Stylesheets (WIP) #3
Replies: 1 comment
-
Sounds good!
Yes.
Thanks. I did, but I can't comment on this because I'm very far from being a CSS/Sass/SMACSS expert. Note (not important): I was really 'not amused' ;-) to see the size of _normalize.scss, and even less amused to see font-family: monospace, monospace;. I looked it up and found this: "Why does it work? How is monospace, monospace different to just monospace? Nobody knows. ..." !!! |
Beta Was this translation helpful? Give feedback.
-
@pml-lang, I've just pushed to the PML Playground repository a new Stylesheet folder/project:
css__default-new/
It contains the CSS from the default PML 3.1.0 stylesheets, but spread across various Sass modules organized according to SMACSS guidelines. Other than that, and the addition of normalize.css, they are identical and should produce identical CSS output.
The idea is to gradually transform them into a Sass "framework" of sorts to generate the default stylesheets, but also allowing easy variations thereof thanks to Sass features. Of course, this all very experimental, and could arguably be seen as being more of an exploration in order to discover what are PML real needs when it comes to CSS, and how we could make the best out of Sass and SMACSS to organize the stylesheets in a flexible and maintainable manner.
I thought that this path would be more productive than just taking a Sass framework and adopt our needs to it, because this exploration allows us to become aware of our real needs and the solutions starting from the ground up. After all, PML is mainly for documents, not websites; furthermore, end users are currently limited to a default HTML underlying template, and for quite some while all CSS themes will have to assume they work with the native HTML template anyhow, which is different from how most Sass/CSS frameworks are expected to be used, i.e. giving for granted that authors have full control over the structure of individual HTML elements.
So I'm sure that even if this project won't result in the definitive default PML stylesheets, it will still be a source of inspiration for us, allowing us to discover needs, problems, and weigh the balance of what features should be covered by the default template (mobile devices support? printed media? etc.).
You will already find some useful comments in the README file and the Sass sources, but when I have more time I'm planning to follow up on this post/thread with some comments and questions regarding the current stylesheets, since I've noticed that some of the CSS definitions don't quite play well with SMACSS and we might need to reconsider their purpose and correct approach.
I'm also not entirely sure how the printed media CSS should be handled — i.e. whether it should be split in its own SMACSS modules or should be kept along with the rest. Of course, when working with Sass it often makes more sense to put things together, because of how Sass compiles the final CSS.
Anyhow, for the time being try to have a look of the new subfolder, if you find the time, so in the future we'll be able to see where to go from here.
Beta Was this translation helpful? Give feedback.
All reactions