Loading ...
Sorry, an error occurred while loading the content.

Trying to create new skin

Expand Messages
  • nasko_himchev
    Hi, I ve tried to create new skin based on the existing yui-skin-sam which comes with the YUI API. Almost everything has started to work except the Layout
    Message 1 of 4 , Jun 2, 2008
    • 0 Attachment
      Hi,

      I've tried to create new skin based on the existing yui-skin-sam which comes with the YUI API.
      Almost everything has started to work except the Layout Manager.

      I've noticed that "yui-skin-sam" is hard coded in "layout-beta.js"

                      if (Dom.hasClass(document.body, 'yui-skin-sam')) {
                         
      //Move the class up so we can have a css chain
                          Dom.addClass(document.documentElement, 'yui-skin-sam');
                          Dom.removeClass(document.body, 'yui-skin-sam');
                      }

      ... and changing it with my skin class name fixed the problem.

      My question is : Why 'yui-skin-sam' is hard coded and do I have to use the same css class name for my new skin when working with YUI layouts ?!?

      Regards,
      Nasko Himchev
    • Dav Glass
      Nasko -- Sorry for the late reply, I missed the thread all together ;) It moves the class up so that it can skin the body element properly.. All it does is
      Message 2 of 4 , Jun 4, 2008
      • 0 Attachment
        Nasko --

        Sorry for the late reply, I missed the thread all together ;)

        It moves the class up so that it can skin the body element properly..

        All it does is check to see if the class is on the body and if it is, move it to the HTML element..

        What problem are you having? Can't you place your own skin class on the html node or the body?

        Can you point me to an example of this not working as expected?

        Dav
         
        Dav Glass
        dav.glass@...
        blog.davglass.com



        + Windows: n. - The most successful computer virus, ever. +
        + A computer without a Microsoft operating system is like a dog
        without bricks tied to its head +
        + A Microsoft Certified Systems Engineer is to computing what a
        McDonalds Certified Food Specialist is to fine cuisine +


        ----- Original Message ----
        From: nasko_himchev <nasko_himchev@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Monday, June 2, 2008 7:51:07 AM
        Subject: [ydn-javascript] Trying to create new skin

        Hi,

        I've tried to create new skin based on the existing yui-skin-sam which comes with the YUI API.
        Almost everything has started to work except the Layout Manager.

        I've noticed that "yui-skin-sam" is hard coded in "layout-beta.js"

                        if (Dom.hasClass(document.body, 'yui-skin-sam')) {
                           
        //Move the class up so we can have a css chain
                            Dom.addClass(document.documentElement, 'yui-skin-sam');
                            Dom.removeClass(document.body, 'yui-skin-sam');
                        }

        ... and changing it with my skin class name fixed the problem.

        My question is : Why 'yui-skin-sam' is hard coded and do I have to use the same css class name for my new skin when working with YUI layouts ?!?

        Regards,
        Nasko Himchev
      • nasko_himchev
        Dav, Thanks for your reply! What I m trying to do is to create my own skin class yui-skin-map which will exist together with yui-skin-sam . My intention is
        Message 3 of 4 , Jun 5, 2008
        • 0 Attachment
          Dav,

          Thanks for your reply!

          What I'm trying to do is to create my own skin class "yui-skin-map"
          which will exist together with "yui-skin-sam". My intention is to
          create even more skins and only to change class name in order to
          apply the given skin.

          When I created my skin I only changed the class of the body from
          "yui-skin-sam" to "yui-skin-map" and expected everything to be fine...
          and almost everything was fine except the layouts.

          I checked the code and found out that Layout Manager expects always
          "yui-skin-sam" to be placed on BODY, what was very strange to me. And
          changing it with different class name DOESN'T work.

          I don't really have a problem.
          I only asked why "yui-skin-sam" class name is hard coded in Layout
          Manager because as to me it is confusing and I thought it's a
          misunderstanding.


          Nasko Himchev

          --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
          >
          > Nasko --
          >
          > Sorry for the late reply, I missed the thread all together ;)
          >
          > It moves the class up so that it can skin the body element properly..
          >
          > All it does is check to see if the class is on the body and if it
          is, move it to the HTML element..
          >
          > What problem are you having? Can't you place your own skin class on
          the html node or the body?
          >
          > Can you point me to an example of this not working as expected?
          >
          > Dav
          >
          > Dav Glass
          > dav.glass@...
          > blog.davglass.com
          >
          >
          >
          >
          > + Windows: n. - The most successful computer virus, ever. +
          > + A computer without a Microsoft operating system is like a dog
          > without bricks tied to its head +
          > + A Microsoft Certified Systems Engineer is to computing what a
          > McDonalds Certified Food Specialist is to fine cuisine +
          >
          >
          >
          > ----- Original Message ----
          > From: nasko_himchev <nasko_himchev@...>
          > To: ydn-javascript@yahoogroups.com
          > Sent: Monday, June 2, 2008 7:51:07 AM
          > Subject: [ydn-javascript] Trying to create new skin
          >
          > Hi,
          >
          > I've tried to create new skin based on the existing yui-skin-sam
          which comes with the YUI API.
          > Almost everything has started to work except the Layout Manager.
          >
          > I've noticed that "yui-skin-sam" is hard coded in "layout-beta.js"
          >
          > if (Dom.hasClass(document.body, 'yui-skin-sam')) {
          > //Move the class up so we can have a css chain
          > Dom.addClass(document.documentElement,
          'yui-skin-sam');
          > Dom.removeClass(document.body, 'yui-skin-sam');
          > }
          >
          > ... and changing it with my skin class name fixed the problem.
          >
          > My question is : Why 'yui-skin-sam' is hard coded and do I have to
          use the same css class name for my new skin when working with YUI
          layouts ?!?
          >
          > Regards,
          > Nasko Himchev
          >
        • Dav Glass
          Nasko -- The fact that Layout moves the yui-skin-sam class from the body to the html node shouldn t break your skin at all. It just won t auto-update the
          Message 4 of 4 , Jun 5, 2008
          • 0 Attachment
            Nasko --

            The fact that Layout moves the yui-skin-sam class from the body to the html node shouldn't break your skin at all.

            It just won't "auto-update" the skin class. That code is there so that we can skin the body..

            Please file a bug report for this and I see what I can do about it in a future release..

            Dav

            Dav Glass
            dav.glass@...
            blog.davglass.com




            + Windows: n. - The most successful computer virus, ever. +
            + A computer without a Microsoft operating system is like a dog
            without bricks tied to its head +
            + A Microsoft Certified Systems Engineer is to computing what a
            McDonalds Certified Food Specialist is to fine cuisine +


            ----- Original Message ----
            From: nasko_himchev <nasko_himchev@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Thursday, June 5, 2008 2:25:28 AM
            Subject: [ydn-javascript] Re: Trying to create new skin

            Dav,

            Thanks for your reply!

            What I'm trying to do is to create my own skin class "yui-skin-map"
            which will exist together with "yui-skin-sam". My intention is to
            create even more skins and only to change class name in order to
            apply the given skin.

            When I created my skin I only changed the class of the body from
            "yui-skin-sam" to "yui-skin-map" and expected everything to be fine...
            and almost everything was fine except the layouts.

            I checked the code and found out that Layout Manager expects always
            "yui-skin-sam" to be placed on BODY, what was very strange to me. And
            changing it with different class name DOESN'T work.

            I don't really have a problem.
            I only asked why "yui-skin-sam" class name is hard coded in Layout
            Manager because as to me it is confusing and I thought it's a
            misunderstanding.


            Nasko Himchev

            --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
            >
            > Nasko --
            >
            > Sorry for the late reply, I missed the thread all together ;)
            >
            > It moves the class up so that it can skin the body element properly..
            >
            > All it does is check to see if the class is on the body and if it
            is, move it to the HTML element..
            >
            > What problem are you having? Can't you place your own skin class on
            the html node or the body?
            >
            > Can you point me to an example of this not working as expected?
            >
            > Dav
            >
            > Dav Glass
            > dav.glass@...
            > blog.davglass.com
            >
            >
            >
            >
            > + Windows: n. - The most successful computer virus, ever. +
            > + A computer without a Microsoft operating system is like a dog
            > without bricks tied to its head +
            > + A Microsoft Certified Systems Engineer is to computing what a
            > McDonalds Certified Food Specialist is to fine cuisine +
            >
            >
            >
            > ----- Original Message ----
            > From: nasko_himchev <nasko_himchev@...>
            > To: ydn-javascript@yahoogroups.com
            > Sent: Monday, June 2, 2008 7:51:07 AM
            > Subject: [ydn-javascript] Trying to create new skin
            >
            > Hi,
            >
            > I've tried to create new skin based on the existing yui-skin-sam
            which comes with the YUI API.
            > Almost everything has started to work except the Layout Manager.
            >
            > I've noticed that "yui-skin-sam" is hard coded in "layout-beta.js"
            >
            > if (Dom.hasClass(document.body, 'yui-skin-sam')) {
            > //Move the class up so we can have a css chain
            > Dom.addClass(document.documentElement,
            'yui-skin-sam');
            > Dom.removeClass(document.body, 'yui-skin-sam');
            > }
            >
            > ... and changing it with my skin class name fixed the problem.
            >
            > My question is : Why 'yui-skin-sam' is hard coded and do I have to
            use the same css class name for my new skin when working with YUI
            layouts ?!?
            >
            > Regards,
            > Nasko Himchev
            >



            ------------------------------------

            Yahoo! Groups Links
          Your message has been successfully submitted and would be delivered to recipients shortly.