Skip to content

tajmone/pml-css-playground

Repository files navigation

PML CSS Playground

PML Version  Ruby  Dart Sass  MIT License 

A playground for testing PML stylesheets.


Table of Contents


Project Structure

About

The goal of this repository is to explore alternative stylesheets for PML, the Practical Markup Language lightweight syntax by Christian Neumanns.

I had attempted a similar project before, as part of the PML Playground project, which included a stylesheets sub-project (among others), but it soon became too cumbersome to maintain a single shared build script for all its projects, especially due to the frequent breaking changes of PML updates. Also, many of the sub-projects in the PML Playground have gone stale, for one reason or another.

So I've now moved the old PML Style Sheets project to this new dedicated repository, which will replace it entirely.

The Themes

  • /css__*/

Every folder with a name starting in css__ is treated as a "theme" by the Rakefile, which will automatically handle its build, provided that the theme contains a Sass/SCSS source named sass/styles.scss, which Rake will compile to css/styles.css.

For each theme, every shared sample document from the /samples/ folder will be converted to HTML in the theme root folder, using the theme stylesheet.

Any *.pml document present in the theme folder will also be converted to HTML in place.

Why Themes Instead of Stylesheets?

They are called "themes" and not just "stylesheets" because in the future they might also provide custom HTML templates along with the CSS stylesheet, i.e. when PMLC will properly support custom templates (right now, only the header and footer can be customized). Furthermore, a theme might also include other dependencies assets, like JavaScript, images, etc., therefore not every theme will consist of a just a single stylesheet.

Adding New Themes

To add a new theme simply create a folder named css__ + the name of your theme, e.g.:

  • /css__my-theme/

Then you need to add the main Sass source file:

  • /css__my-theme/sass/styles.scss

That's it! Rake will take care of everything, including tracking dependencies in the sass/ folder (_*.scss and *.css). Your stylesheet will automatically be compiled to:

  • /css__my-theme/css/styles.css

Any *.pml test/sample documents in your theme folder will also be automatically tracked and converted by Rake, along with the shared documents.

Rake will also add a dedicated task for your theme, named as your theme folder minus the css__ prefix (e.g. my-theme in our example).

The Sample Documents

The PML documents in the /samples/ folder are intended as test documents for the new themes, and also as references for comparison, since they will also be converted to HTML in their source folder, using the default PML stylesheet.

In the course of time, the sample documents will eventually cover all PML elements, their various combinations, and edge cases that need to be handled properly by any stylesheet.

License

The PML CSS Playground is Copyright (c) by Tristano Ajmone, released under the terms of the MIT License.

MIT License

Copyright (c) 2024 Tristano Ajmone

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Links

Articles

Articles by Christian Neumanns:

PML on GitHub

About

A playground for testing PML stylesheets

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published