Button style inconsistent in most devices.

5 posts, 0 answers
  1. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 08 Apr 2014 Link to this post

    According to the docs a Button can either be a <a data-role="button"> or a <button data-role="button">.  You would expect them to appear the same no matter which one you use.  However, on Android, Blackberry, and WP devices, they are styled differently.

    For example in Android, <a>'s have bold text while <button>'s do not.  You can see this bug here:

    http://trykendoui.telerik.com/@sweffect/iZAf

    (Be sure to set the device from "Web" to "Android" before running it.)
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 11 Apr 2014 Link to this post

    Hi Donald,

    Thank you for contacting us. When it comes to buttons, each platform has its own default styling (background, borders, font-weight, and size. etc.) The styling provided by the Kendo UI Mobile skins does not try to override these, as some people my prefer it this way. If this is an issue in your project, than you should avoid using buttons and resort to A elements instead.

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 11 Apr 2014 in reply to Petyo Link to this post

    You said:
    "When it comes to buttons, each platform has its own default styling (background, borders, font-weight, and size. etc.) The styling provided by the Kendo UI Mobile skins does not try to override these"

    If that were true, however,  then a normal <button> should be styled the same as a <button data-role="button"> on each device, but that is not the case as shown in this example:  http://trykendoui.telerik.com/@sweffect/iZAf/2

    In any case, I will follow your advice and change my <button>'s to <a>'s.  However, the styling behavior for  <button data-role="button"> still seems inconsistent.




  4. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 16 Apr 2014 Link to this post

    Hello Donald,

    I went ahead and made the A and BUTTON elements a bit more alike when used as a Kendo Mobile Button. It is already live in Kendo UI Core and will be also included in the next internal build.

    Let me know if this helps.

    Regards,
    Kamen Bundev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 19 Apr 2014 in reply to Kamen Bundev Link to this post

    Thanks.  Though I've already changed my <button>'s to <a>'s as suggested by Petyo, making the button widgets style consistently should help avoid headaches in the future.
Back to Top