edfungus/Crouton

Font size on crouton-simple-text

edfungus opened this issue · 2 comments

From #3 by @gilav

Hello

I wanted to know if it's possible to reduce the font-size used in the crouton-simple-text value field. I display a dateTime and the text is way too big.

by the way this is a really nice tool...
gilles

Yes, the font size can be reduced. I assume you only want to reduce it for crouton-simple-text? There isn't a user friendly way but the less file can be edited.

For example, in the less file of crouton-simple-text font-size in both .textDisplay and .titleDisplay can be edited to a font size of your choosing.

To edit the font sizes across crouton, you can edit the less variables @db-main-font-size, @db-title-font-size and others you see fit.

Note, after you change the font size, be sure to recompile the less to css by rerunning the grunt command

gilav commented

Hello Hedmund

Thanks, changing the css did the job. But It would be nice to be able to adjust the font size per endPoint in the deviceInfo file, using some optional argument. something like:

        "aDate": {
            "units": "Date",
            "values": {
                "value": "N/A"
            },
            "valuesFont": "some_size_or_css_value??"
            "card-type": "crouton-simple-text",
            "title": "Host date"
        },

Is something like this possible?

best regards

gilles

PS: I have other questions, I will put them in the 'some question' topic...