Thanks Mustafa,
I am actually using a similar approach like you suggested, but I did it
dirtier like so:
In de index.html I defined the following:
<script type="text/javascript">
var baseFontSize = 14;
function em (relativeValue){
return parseInt(baseFontSize * relativeValue, 10);
}
</script>
Which provides a function called em() which I can easily use in my theme
like so:
margin: [em(1),em(2)]
It would still be nice if I could integrate it in the theme so I could
call it like this.em(1).
bye,
Sanne
On 06/10/2014 11:35, Mustafa Sak wrote:
Hi Sanne,
I would advise you to use a static class function something like:
Font theme class:
...
fonts :
{
"default" : {
size : myapp.theme.Util.rem(0.8), // <<----- the static function
lineHeight : 1.33,
family : ["Verdana", "sans-serif"],
decoration : "underline"
},
...
Your util class could be a qx.Class or qx.Bootstrap definition, e.g.:
qx.Class.define("myapp.theme.Util",
{
extend : qx.core.Object,
statics : {
ROOT_FONT_SIZE : 14,
rem : function(factor) {
// add logic and return ;)
}
}
});
It should be possible to force the change of font size in runtime, especially
with current master of qooxdoo (pre 4.1).
Gruß
Mustafa Sak
Applications & Integration
1&1 Internet AG
Ernst-Frey-Straße 10
DE-76135 Karlsruhe
-----Ursprüngliche Nachricht-----
Von: Sanne Peters [mailto:sa...@realtimesolutions.nl]
Gesendet: Montag, 6. Oktober 2014 11:04
An: qooxdoo-devel@lists.sourceforge.net
Betreff: [qooxdoo-devel] Using an em-value-based-like system for qooxdoo
Desktop theming
Hi,
First of all, for as far I can deduce from the documentation and the code using
em values in qooxdoo themes is impossible. I know that.
What I want to do is develop a theme (for our company) that is based on a base
font size (say 14 px) and base all other styling on on that (like em values).
More theory on this you can read here:
http://www.vanseodesign.com/css/em-px/.
But are there alternative methods for using a similar system in qooxdoo theming?
What I have tried so far is using a global variable holding a base font size
defined in Application class, but the theme is loaded before the Application
class and the variable is not available for the Theme yet.
So that's a bust.
Also a second idea would be to define it in the theme somehow, but it does not
allow for custom keys/properties.
Another would be to define the global variable in the index.html file, but that
is kind of messy and hurts the maintainability of the Theme.
Any smart/insightful ideas?
kind regards,
Sanne
kind regards,
Sanne
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel