af|inputText.myStyleClass::label should parse in the css file to:

.af_inputText.myStyleClass .af_inputText_label {}
If it doesn't, I think it is a bug.

I'll submit a JIRA issue.

But, there is a simple workaround:

af|inputText.myStyleClass af|inputText::label {}

This is easier on the parser. :)
It parses to :
.af_inputText.myStyleClass .af_inputText_label {}

This says, "Style the dom element with the styleclass af_inputText_label which has a parent with styleclasses af_inputText AND myStyleClass."

Then you say this:

<af:inputText styleClass="myStyleClass"/>

The 'myStyleClass' is what I call a 'marker' styleclass -- don't go googling this, I made up the term. :) It's a way to mark this particular inputText so you can use your style definition for only the inputText's that have this marker.

I can post blogs for skinning with tips like this. Where should I put these?

Thanks,

- Jeanne



Simon Lessard wrote:
Hmmmm,

What about af|inputText.myStyleClass::label?

On 5/14/07, *Francisco Passos* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    That was it, thank you! Firefox tends to keep the css in cache, so
    after clearing it works fine.

    However your previous suggested solution for the initial problem I
    presented:

        af|inputText::label.myStyleClass {
            font-weight : bold;
        }

        <tr:inputText styleClass="myStyleClass"/>


    does not seem to work, in that the label is not presented in bold.


    On 5/14/07, * Simon Lessard* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:

        Hello Francisco,

        Hmmm it might be a browser cache problem. When working with
        skin you have to clear your browser cache often else it will
        use the cached CSS. I assume that, in your case, the last
        change you made either triggered a filename change or your
        browser cache expired thus loading the latest CSS and showing
        all changes.


        Regards,

        ~ Simon


        On 5/14/07, *Francisco Passos* < [EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>> wrote:

            Oddly enough, if I add

            @platform windows, linux, solaris
            {
              /** for ie and gecko on windows, linux and solaris, make the 
color pink **/



              @agent ie, gecko
              {
                af|inputText::content {background-color:pink}

              }
            }

            to the css, suddenly everything works - the text size, the
            red background color, the bold font weight...

            What should I make of this?


            On 5/14/07, * Francisco Passos*
            <[EMAIL PROTECTED]
            <mailto:[EMAIL PROTECTED]>> wrote:

                Thank you for your hint, I'll try it as soon as I can.

                It seems that I'm not quite there yet, I'm two steps
                behind.

                I'm using a skin extending the simple-desktop:

                <skins xmlns=" http://myfaces.apache.org/trinidad/skin";>
                    <skin>
                        <id>stp.desktop </id>
                        <family>stp</family>
                        <render-kit-id>
                org.apache.myfaces.trinidad.desktop</render-kit-id>
                        <style-sheet-name>
                            resources/css/skin-stp.css
                        </style-sheet-name>
                        <extends>simple.desktop</extends>
                    </skin>
                </skins>

                and in skin-stp.css I define some things, such as

                .AFDefaultFont:alias {
                  font-size : 18px;
                }

                and

                af|inputText::label {
                    background-color: red;
                    font-weight: bold;
                }

                And none of them is working. The text is overall very
                small (nowhere near the 18px I put there to test) and
                tr:inputText labels are neither red nor bold. It seems
                like it is ignoring my skin-stp.css definitions. What
                could cause this?


                On 5/11/07, *Simon Lessard* <
                [EMAIL PROTECTED]
                <mailto:[EMAIL PROTECTED]> > wrote:

                    Hello Francisco,

                    You could try the following:

                    af|inputText:: label.myStyleClass {
                        font-weight : bold;
                    }

                    <tr:inputText styleClass="myStyleClass"/>

                    I think it might work.


                    Regards,

                    ~ Simon


                    On 5/11/07, *Francisco Passos *
                    <[EMAIL PROTECTED]
                    <mailto:[EMAIL PROTECTED]>> wrote:

                        Hello there!

                        I'd like most of my inputTexts to be rendered
                        as they are by default.

                        However, I'd like a few of them to have a bold
                        label.

                        I tried this:

                        af|inputText::label {
                            font-weight : bold;
                        }

                        But as you know this leads every inputText to
                        have their labels in bold.

                        Is there any way to reference ::label from
                        within the inlineStyle property and define
                        this property on the spot?







Reply via email to