0

I'm completely new to Pixate Freestyle in Xcode and while experimenting with it, I couldn't get any padding to work on a UIButton. Other properties like background-color, border and border-radius are working but the padding doesn't seem to do anything.

Is there anything I have to do in order to add padding to a button ? Or is it that buttons simply cannot be padded?

I'm using Xcode 7.0.1 and the latest version of PixateFreestyle.

Thanks! :)

Émile Perron
  • 813
  • 10
  • 26

1 Answers1

0

Think you need to use background-padding You can see documentation here

For example, using the video as a guide, I can make a button styled like this: enter image description here

But then if I set background-padding: 50px; It will appear like this: enter image description here

If you are using negative values, you should keep in mind that the button will not grow larger than the frame set in your storyboard or .xib.

The CSS I used was:

.btn-green {
    color :#446620;
    background-color:linear-gradient(#87c44a,#b4da77);
    border-width: 2px;
    border-color:#000000;
    border-style: solid;
    border-radius:10px;
    font-size: 13px;
    background-padding: 50px;
}
beyowulf
  • 15,101
  • 2
  • 34
  • 40
  • I have tried using background-padding, but sadly it doesn't work, and makes the other properties I've set to the selector stop working as well. :/ – Émile Perron Apr 09 '16 at 00:06
  • I'm sorry, what video are you referring to? I don't see a video in the documentation you linked. – Émile Perron Apr 09 '16 at 12:32
  • You can watch it here: https://player.vimeo.com/video/79832578 But it's not that important to your problem if you've already have styling working. I was just saying, I was going to style the button green like in the video. You should post what you are getting what you're expecting. – beyowulf Apr 09 '16 at 12:37