royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com.INVALID>
Subject Re: YUI compressor for CSS (relates to apache/royale-compiler#39)
Date Tue, 10 Apr 2018 15:20:56 GMT
The "." is a bug from the search and replacing of "Apache Flex" to "Apache
Royale".   Replace the "." with a "-" in both the .css and the
ComboBoxView and then in examples that don't use ComboBox, the
opt_org-apache-royale-html-ComboBox_Button selector should not be in the
output.

I don't know how the compiler would know to change the assignment of:

   button.className = "ComboBox_Button";


in ComboBoxView to

   button.className = "opt_org-apache-royale-html-ComboBox_Button";


CSS Pruning might be a feature advantage for Royale if for really small
examples the initial download is much smaller than 140K of CSS.

My 2 cents,
-Alex

On 4/10/18, 3:59 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira"
<carlos.rovira@gmail.com on behalf of carlosrovira@apache.org> wrote:

>Hi Alex,
>
>I think you refer to this example found in Basic css
>
>.opt_org-apache.royale-html-ComboBox_Button {
>    padding: 0px;
>    margin: 0px;
>}
>
>I want to explore this way, but can't fully understand the name
>composition:
>
>I assume I need to start with ".opt_" then add fully qualified name. In
>the
>example I found
>
>org-apache.royale-html-ComboBox_Button
>
>that has "-" and "." separations.
>
>I was expecting "org-apache-royale-html-ComboBox_Button"
>
>assuming that "-" are used to match "ComboBox" and then "_" + somcomponent
>(in this case "Button") to much a subcomponent
>
>Another thing I found is that I see in ComboBoxView the className
>assignation:
>
>button.className = "opt_org-apache.royale-html-ComboBox_Button";
>
>Is this really needed? I was hoping that compiler will add it in the same
>way is handling the pruning
>
>I'm a bit confussed here
>
>Let me know if this is the way to use it so I can fully understand
>implications
>
>I'll think as well in the latest option to see how will be the final
>scenario. If I make changes, I think is the moment to define it entirely.
>
>I think could be good to prune what is not used, but don't think it should
>be very important since as you said MDL, Bootstrap have a size that mostly
>will be the same as Jewel when finished, so for me is part of the
>framework
>and as HTML is the structuring part, CSS is the visual and effects part
>and
>100 to 200kb seems to me very reasonable, and most if we want to generate
>pretty and clean layouts, controls and screens.
>
>
>thanks
>
>Carlos
>
>
>
>2018-04-10 9:34 GMT+02:00 Alex Harui <aharui@adobe.com.invalid>:
>
>> Type Selectors are pruned out if the Class/Type is not used in the
>>output.
>>
>> I've toyed with ways to prune class selectors.  If you use class
>>selectors
>> with names with the pattern:
>>
>>   opt_class-qualified-name-with-hyphens_SomeName
>>
>> Then the compiler will prune out the class selector if that class is not
>> in the output.  That way you can associate class selectors with a class.
>>
>> Another option is to not use class selectors at all in the framework.
>> Create subclasses for all of the internal pieces and create type
>>selectors
>> for them.  This also avoids using advanced selectors in the CSS
>> Implementation.
>>
>> HTH,
>> -Alex
>>
>> On 4/9/18, 11:56 PM, "Harbs" <harbs.lists@gmail.com> wrote:
>>
>> >We can probably eliminate the vast majority of code redundancy if
>>that’s
>> >true. The problem with CSS is that it’s pretty hard to do the same
>>there.
>> >
>> >Is there any way to strip the css down to only the classes that are
>> >actually used by the components used in the app? I’m guessing that will
>> >be really hard…
>> >
>> >The work you’ve done with Jewel is great, but I didn’t realize this
>> >down-side of using css classes until now.
>> >
>> >Harbs
>> >
>> >> On Apr 10, 2018, at 9:45 AM, Carlos Rovira <carlosrovira@apache.org>
>> >>wrote:
>> >>
>> >> @Harbs, one more thing I forgot to say before, you must notice is
>>that
>> >> Jewel will increase a bit in size in CSS since I'll try layouts to be
>> >> mostly CSS rules, in the other hand that will sabe lots of redundant
>> >>inline
>> >> code in HTML setting margins, displays, paddings, and more.
>> >
>>
>>
>
>
>-- 
>Carlos Rovira
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2
>Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cba2ff4e5a18b4288db9d08d5
>9ed23a0d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636589548200405777&s
>data=vZD0ulJC1f1kIPhe67HB%2BOy8h32a0pEdDbCV%2BbNKM%2B4%3D&reserved=0

Mime
View raw message