flute
flute copied to clipboard
styles loader for "tailwind" css
for current theme, class/body.txt
,
bg-grey-light
font-sans
leading-normal
tracking-normal
would output as https://github.com/foundpatterns/base-theme/blob/165d95e5d06065e4ccc016d780bf344b99b0307a/base.html#L65
load each tag/tagged-id 's txt file serialize the table with an arg separator, in this case a space similar to the events.txt load them as a list, then output them to the html tag classes string
we need to have id's for every tag
has to work with both semantic tags and tag ids
_class/base.html-body.txt
font-sans
leading-normal
tracking-normal
the _class/
folder is a sibling folder to the template with the "template class" files (that end in .txt)
after theme loader creates temp-theme/
find every "template class" and patch its template's class
Tthe class file name must be _class/base.html-body.txt
-
_class
to make it explicit that it's a special directory -
base.html
says that the classes apply to elements of that file -
body
is the element to wich the classes are applied
has to work on any element both semantic tags and tags with an id
to indicate an element id, we could do the css way and name the file base.html-#myid.txt
(note the numeral sign)
for the body element: base.html-body.txt
fot the element with "body" as id: base.html-#body.txt
there's no ambiguity because the #
character isn't allowed in element tag names
also, there's no need to specify the tag name and the element id at the same time because html documents can't have two elements with the same id
After #106, allow _class
directories in any subdirectory of the theme
it's only working with tag names, not id names. my-theme
shows this; only <p>
gets the classes, not <div id="p">
also what about subdirectories?
inheritance isn't working
needs finalizing changes: are we going to keep the divergent XML syntax where id attribute name is implict?.. needs review needs docs it works very well though now :)