Button CSS (text-decoration: underline)

7 posts, 1 answers
  1. RES
    RES avatar
    77 posts
    Member since:
    Sep 2010

    Posted 17 Jan 2014 Link to this post

    I have an example page at the following URL that has the Kendo CSS files placed after my main CSS file but yet the Kendo CSS text-decoration: none in the k-button style is being overriden by my main CSS file.  Shouldn't the Kendo's CSS rules override my main CSS rules since they are placed after the main CSS file in the header?

    http://example.rengr.co
  2. RES
    RES avatar
    77 posts
    Member since:
    Sep 2010

    Posted 17 Jan 2014 Link to this post

    I'm sorry I forgot to mention this issue occurs on hover.
  3. Kendo UI is VS 2017 Ready
  4. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 20 Jan 2014 Link to this post

    Hi,

    The observed issue is caused by a:hover selector has higher specificity than .k-button. Hence in order to achieve the expected result you could add the following CSS rule: 
    .k-button:hover{
        text-decoration: none;
    }

    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. RES
    RES avatar
    77 posts
    Member since:
    Sep 2010

    Posted 17 Feb 2014 in reply to Iliana Nikolova Link to this post

    From what I've read a class selector has a higher specificity than an element selector so why would the a:hover rule be overriding the .k-button rule?
  6. RES
    RES avatar
    77 posts
    Member since:
    Sep 2010

    Posted 18 Feb 2014 in reply to RES Link to this post

    Okay I get it now when I look at the rule for .k-button:hover there is no text-decoration: none;.  So shouldn't this rule explicitly specify this specially for cases like this so you don't have to patch Kendo's CSS?
  7. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 19 Feb 2014 Link to this post

    Hi,

    Your suggestion sounds OK - we will add text-decoration: none rule for the a.k-button:hover elements with the next Kendo UI release.

    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  8. RES
    RES avatar
    77 posts
    Member since:
    Sep 2010

    Posted 19 Feb 2014 in reply to Iliana Nikolova Link to this post

    Sounds good, thanks.
Back to Top
Kendo UI is VS 2017 Ready