I'm not sure what you put in the theme for MDL.  But it shouldn't matter
whether it is in a theme or in MDL's defaults.css since nobody in
MDLTabsExample is trying to override it.  MDL only needs its own theme if
someone will want to use the structural aspects of the MDL components (the
layouts and views described by style properties that have ClassReference)
but give it a new look.

That might be a reasonable task to try some day.  We've seen that
virtually all popular themes like MDL and Bootstrap and even Vivid have
created the same structure for a Checkbox in order to fully style it, so
we could get rid of Flat.swc and MDL.swc and have a single
"HighlyStyleable.swc" that has a defaults.css that describes that
structure and move all styling into themes.css files.

My 2 cents,
-Alex

On 2/23/18, 8:09 AM, "Piotr Zarzycki" <piotrzarzyck...@gmail.com> wrote:

>I have added separate theme for MDL - didn't touch basic.css at all. I did
>add it as an
><additionalCompilatorArgument>-theme=path</additionalCompilatorArgument> -
>this doesn't change anything in Basic module.
>
>On Fri, Feb 23, 2018, 17:05 Piotr Zarzycki <piotrzarzyck...@gmail.com>
>wrote:
>
>> I think I see where the issue may be, but not sure if it is an issue. I
>> have created separate project where I have only MDL Card component. I'm
>> setting property shardow = "2" [1]. This property is being called, but I
>> don't have line with typeNames - it's deleted.
>>
>> What is happen:
>>
>> 1) Constructor is setup class typeNames="mdl-card" - OK
>> 2) Property shadow is being called - it's adding to
>>classList.add(mdl-shadow--2-dp")
>> css class.
>> 3) addedToParent being called. It's removed everything what is inside
>> classList and replace it with "mdl-card"
>> - Should it work like that ?
>>
>> That is why I'm observing such a mess up after moving all typeNames to
>> constructor.
>>
>> [1] 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.ap
>>ache.org%2Fat0H&data=02%7C01%7Caharui%40adobe.com%7Cb84805db33a645fee6980
>>8d57ad7eb17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365499901373597
>>73&sdata=JbujMT12ZHgIWBHWRA84hLUUT4gzQ%2FKnPQF1%2B%2B31d%2FY%3D&reserved=
>>0
>>
>> Thanks, Piotr
>>
>> 2018-02-23 16:37 GMT+01:00 Piotr Zarzycki <piotrzarzyck...@gmail.com>:
>>
>>> A bit more on point 1. and let's take for the example simple Button. We
>>> have some styles for Button in Basic.css. MDL Button extends
>>>TextButton -
>>> some styles naturally has been added from default.css.
>>>
>>> If I create theme I should achieve that my theme classes will override
>>> default.css Button styles and I should be good yes ?
>>>
>>> Am I understand it correctly ?
>>> Thanks, Piotr
>>>
>>>
>>> 2018-02-23 16:32 GMT+01:00 Piotr Zarzycki <piotrzarzyck...@gmail.com>:
>>>
>>>> Alex,
>>>>
>>>> I have started to work on MDL and move all typeNames from
>>>>createElement
>>>> to constructor. Unfortunately something is not right here.
>>>>
>>>> 1) I still need to exclude BasicJS.swc:default.css - I did add theme
>>>>to
>>>> MaterialDesignLite module maven build - it didn't help.
>>>> 2) If I cannot setup typeNames and classNames inside my component, how
>>>> can I achieve switching some UI parts of the component ? In MDL it is
>>>>quite
>>>> common that if I would like to change component I'm adding to it css
>>>>class.
>>>> [1] - This is the example. If I remove line it doesn't work. There are
>>>> several places in MDL where we are doing such things. It is common in
>>>>JS
>>>> world doing such things.
>>>>
>>>> typeNames = element.className;
>>>>
>>>> Thoughts ?
>>>>
>>>> [1] 
>>>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.
>>>>apache.org%2Fat0H&data=02%7C01%7Caharui%40adobe.com%7Cb84805db33a645fee
>>>>69808d57ad7eb17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365499901
>>>>37359773&sdata=JbujMT12ZHgIWBHWRA84hLUUT4gzQ%2FKnPQF1%2B%2B31d%2FY%3D&r
>>>>eserved=0
>>>>
>>>> Thanks,
>>>> Piotr
>>>>
>>>>
>>>> 2018-02-23 15:55 GMT+01:00 Piotr Zarzycki <piotrzarzyck...@gmail.com>:
>>>>
>>>>> Peter,
>>>>>
>>>>> That is interesting what you are saying. What will happen then if you
>>>>> have class which extends other one. The parent class is setting
>>>>>typeNames
>>>>> and derived one also before super? The parent one will override it?
>>>>>
>>>>> I cannot check now how typeNames is implemented.
>>>>>
>>>>> Piotr
>>>>>
>>>>>
>>>>> On Fri, Feb 23, 2018, 15:13 Peter Ent <p...@adobe.com.invalid> wrote:
>>>>>
>>>>>> I have been guilty of this and have been using typeNames now. I've
>>>>>> found
>>>>>> that I need to set typeNames before calling super() in the
>>>>>> constructor. I
>>>>>> thought it was done afterwards, but if I set typeNames after calling
>>>>>> super(), the typeName I set does not show up in the HTML produced.
>>>>>>
>>>>>> Also, suppose I have this: A Menu with a label inside of it. People
>>>>>> will
>>>>>> want to change the background color of the menu and the color of the
>>>>>> label's text. If I were doing this in plain HTML/JS/CSS, I would
>>>>>>set a
>>>>>> selector:  .Menu .Label { color: blue; } but that's not supported in
>>>>>> the
>>>>>> Flash Player. So when I set up the typeName for the label inside of
>>>>>>the
>>>>>> Menu should I set it to: Menu_Label or MenuLabel or Menu-Label? And
>>>>>>is
>>>>>> using "." in a selector name a good idea? I would think the CSS
>>>>>> processor
>>>>>> in the browser would be confused between ".x.y" and ".x .y" which
>>>>>>can
>>>>>> also
>>>>>> be written as ".x.y". Basically, we should have a consist naming
>>>>>> pattern
>>>>>> here.
>>>>>>
>>>>>> ‹peter
>>>>>>
>>>>>> On 2/23/18, 4:09 AM, "Gabe Harbs" <harbs.li...@gmail.com> wrote:
>>>>>>
>>>>>> >There¹s some edge cases which seem problematic. One example:
>>>>>> >ComboBoxBiew has the following:
>>>>>> >            input = new TextInput();
>>>>>> >            input.className = "ComboBoxTextInput";
>>>>>> >
>>>>>> >            button = new TextButton();
>>>>>> >            button.className =
>>>>>> >"opt_org-apache.royale-html-ComboBox_Button";
>>>>>> >
>>>>>> >Input and button are both external to the view class, but are
>>>>>>managed
>>>>>> by
>>>>>> >the view class. On the other hand, there is a chance that the user
>>>>>> might
>>>>>> >wan to style them. I¹m not sure whether className or typeNames is
>>>>>>more
>>>>>> >appropriate hereŠ
>>>>>> >
>>>>>> >Harbs
>>>>>> >
>>>>>> >> On Feb 23, 2018, at 11:03 AM, Gabe Harbs <harbs.li...@gmail.com>
>>>>>> wrote:
>>>>>> >>
>>>>>> >> I¹ll help.
>>>>>> >>
>>>>>> >>> On Feb 23, 2018, at 10:50 AM, Alex Harui
>>>>>><aha...@adobe.com.INVALID
>>>>>> >
>>>>>> >>>wrote:
>>>>>> >>>
>>>>>> >>> Quick note before I shut down for the night.
>>>>>> >>>
>>>>>> >>> UIBase has both a typeNames and className property.  TypeNames
>>>>>>is
>>>>>> used
>>>>>> >>>to
>>>>>> >>> emulate Flex-like type selectors in the CSS lookup.  It should
>>>>>>be
>>>>>> set
>>>>>> >>>in
>>>>>> >>> the constructor and never set from outside the class.  There
>>>>>>are a
>>>>>> few
>>>>>> >>> classes in Basic and lots of classes in MDL that should be
>>>>>> upgraded to
>>>>>> >>>set
>>>>>> >>> typeNames in the constructor.  Subclasses can append to the base
>>>>>> >>>class's
>>>>>> >>> typeNames
>>>>>> >>>
>>>>>> >>> className is the opposite.  It should never be set inside the
>>>>>> >>>component's
>>>>>> >>> class.  It is for users of that component to set styles on the
>>>>>> >>>component.
>>>>>> >>>
>>>>>> >>> Can we get a volunteer to clean this up?
>>>>>> >>>
>>>>>> >>> Thanks,
>>>>>> >>> -Alex
>>>>>> >>>
>>>>>> >>
>>>>>> >
>>>>>>
>>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Piotr Zarzycki
>>>>
>>>> Patreon: 
>>>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.p
>>>>atreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb84805db
>>>>33a645fee69808d57ad7eb17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>>>>36549990137359773&sdata=BlEBtP0rTtkFlipCjRUBn1bg9rSK5UdLfXO4OZ4nH7s%3D&
>>>>reserved=0
>>>> 
>>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.p
>>>>atreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb84805db
>>>>33a645fee69808d57ad7eb17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>>>>36549990137359773&sdata=BlEBtP0rTtkFlipCjRUBn1bg9rSK5UdLfXO4OZ4nH7s%3D&
>>>>reserved=0>*
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Piotr Zarzycki
>>>
>>> Patreon: 
>>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pa
>>>treon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb84805db33
>>>a645fee69808d57ad7eb17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365
>>>49990137359773&sdata=BlEBtP0rTtkFlipCjRUBn1bg9rSK5UdLfXO4OZ4nH7s%3D&rese
>>>rved=0
>>> 
>>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pa
>>>treon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb84805db33
>>>a645fee69808d57ad7eb17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365
>>>49990137359773&sdata=BlEBtP0rTtkFlipCjRUBn1bg9rSK5UdLfXO4OZ4nH7s%3D&rese
>>>rved=0>*
>>>
>>
>>
>>
>> --
>>
>> Piotr Zarzycki
>>
>> Patreon: 
>>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb84805db33a6
>>45fee69808d57ad7eb17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365499
>>90137359773&sdata=BlEBtP0rTtkFlipCjRUBn1bg9rSK5UdLfXO4OZ4nH7s%3D&reserved
>>=0
>> 
>><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pat
>>reon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb84805db33a6
>>45fee69808d57ad7eb17%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6365499
>>90137359773&sdata=BlEBtP0rTtkFlipCjRUBn1bg9rSK5UdLfXO4OZ4nH7s%3D&reserved
>>=0>*
>>

Reply via email to