Oh-button label size

How can I adjust a label size of the oh-button ?
I tried a text-size and only size, but no luck :

slots:
              default:
                - component: oh-button
                  config:
                    text: "XX"
                  style:
                    text-size: 20px

In most cases like this, one of the first things you should do is check out the f7 css variables (or just inspect the element using your browser dev tools to find out if the property you want to change is set by a css variable).

image

In this case you see that there’s an --f7-button-font-size variable. So, the easiest solution to the problem is to use the style property in the button itself to change the value of that variable for the button and it’s label.

component: f7-card
config:
  title: Button Demo
slots:
  default:
    - component: oh-button
      config:
        raised: true
        text: Button Text
        style:
          --f7-button-font-size: 32px

image

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.