Sunday, May 19, 2024

Glimmer DSL for CSS Media Queries + CSS To Glimmer Converter

Glimmer DSL for CSS 1.3.0 and 1.4.0 just shipped with support for CSS Media Queries and a CSS To Glimmer Converter!!! This gem is included in Glimmer DSL for Web to enable styling elements with CSS via a Ruby DSL. Glimmer is smart enough to have multi-DSL support, meaning it enables using a Ruby DSL for CSS and another Ruby DSL for HTML in the same file, and it's all Ruby code in the end, so one language, but interpreted differently depending on the applicable domain to facilitate writing the simplest code possible for each domain. 

See the attached code example for a media query written in Glimmer DSL for CSS Ruby code. 

Yes, it is Ruby, not CSS, believe it or not!! Meaning the code could leverage all the capabilities of Ruby when needed.

Additionally, in order to facilitate integrating old legacy CSS with newly built Glimmer DSL for Web applications, Glimmer DSL for CSS now includes a CSS To Glimmer Converter that automatically converts legacy CSS code to Glimmer DSL for CSS Ruby code. 

I will leave you with the README documentation of CSS To Glimmer Converter below.

Happy Glimmering!


No comments: