Comments on: New to flexlib: CSSPropertyInjector http://www.adamflater.net/2009/09/14/new-to-flexlib-csspropertyinjector/ Tech, UX, Design Wed, 04 Jan 2012 21:31:56 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: Gilles Guillemin http://www.adamflater.net/2009/09/14/new-to-flexlib-csspropertyinjector/#comment-266 Gilles Guillemin Mon, 14 Sep 2009 16:45:33 +0000 http://www.adamflater.net/?p=75#comment-266 That's precisely what I had in mind. Excellent.

]]>
By: Adam Flater http://www.adamflater.net/2009/09/14/new-to-flexlib-csspropertyinjector/#comment-265 Adam Flater Mon, 14 Sep 2009 16:23:50 +0000 http://www.adamflater.net/?p=75#comment-265 Now that I think about it.. you can do this now:

<mx:Style>
.style1
{
color : #ff0000;
}
.style2
{
border-color : #00ff00;
}
.style3
{
fill-colors : #000000, 000000;
}
.buttonStyles
{
styleNames : style1, style2, style3;
}
</mx:Style>

<flexlib:CSSPropertyInjector
target="{ buttonInjector }"
styleName="buttonStyles" />
<flexlib:CSSPropertyInjector
id="buttonInjector"
target="{ button }" />

<mx:Button id="button" label="Test" />

]]>
By: Adam Flater http://www.adamflater.net/2009/09/14/new-to-flexlib-csspropertyinjector/#comment-264 Adam Flater Mon, 14 Sep 2009 15:46:14 +0000 http://www.adamflater.net/?p=75#comment-264 @Gilles

I'd have to explore this one a little bit. It sounds like a good idea, but at the same time sort of turns it back into the current Flex implementation of CSS. The power is being able to mix and match different selectors. I suppose CSS in HTML has the feature you're talking about so it's probably valuable for some cases.

]]>
By: Ravi http://www.adamflater.net/2009/09/14/new-to-flexlib-csspropertyinjector/#comment-263 Ravi Mon, 14 Sep 2009 10:24:12 +0000 http://www.adamflater.net/?p=75#comment-263 Hi,

You are doing really good job. Keep it up.

http://www.rsdhariwal.com

]]>
By: Gilles Guillemin http://www.adamflater.net/2009/09/14/new-to-flexlib-csspropertyinjector/#comment-262 Gilles Guillemin Mon, 14 Sep 2009 08:19:33 +0000 http://www.adamflater.net/?p=75#comment-262 Exactly. Say, in your first example, you want to change the outterbox from blueBorder to redBorder you would just have to change it in the css and not as a property of the CSSPropertyInjector.

]]>
By: Adam Flater http://www.adamflater.net/2009/09/14/new-to-flexlib-csspropertyinjector/#comment-261 Adam Flater Mon, 14 Sep 2009 04:57:16 +0000 http://www.adamflater.net/?p=75#comment-261 Interesting idea.. I think you're talking about defining an aggregate grouping of styles?

]]>
By: Gilles Guillemin http://www.adamflater.net/2009/09/14/new-to-flexlib-csspropertyinjector/#comment-260 Gilles Guillemin Mon, 14 Sep 2009 04:54:33 +0000 http://www.adamflater.net/?p=75#comment-260 Hi Adam, excellent and definitely useful one (and I'm quite sure I will use it).
There's one thing that seems missing though (or maybe it's there and I just don't see it): if you push the idea to its limits, one should be able to set the various stylenames inside the CSS itself, so you can easily change the various targets' styles by editing the CSS only.

Something like affection stylename="cssPropertyInjectorStyle" to the CSSPropertyInjector and then:
styleNames: "blueBorder,solidBorder,whiteBackground,padding20px,centered,ceneterdContent"; inside the CSS.

See what I mean?

]]>