Page 1 of 1

Setting height and width to oxy_button?

Posted: Sat May 07, 2022 1:36 pm
by ttasovac
Forgive me for being too pedantic :) but how can one style an oxy_button in Author View css? At the moment, I have this:

Code: Select all

correspAction persName:after {
    content: oxy_button(action, oxy_action(
          name, '+',
          description, 'Insert an element after the current one', 
          icon, url('add.png'), 
          operation, 'InsertFragmentOperation', 
          arg-fragment, '<persName xmlns="http://www.tei-c.org/ns/1.0">${caret}</persName>',
          arg-insertLocation, '.',
          arg-insertPosition, 'After')
          )     
}
As you can see in the attached image, the button has a different height from the text input it is sitting next to. It is also too wide considering that I'm using an icon.
Снимок экрана 2022-05-07 в 10.18.47.png
Adding

Code: Select all

transparent, true
doesn't solve the problem because the height remains off and I still can't figure out how to control the width.

What am I missing?

Many thanks in advance.

All best,
Toma

Re: Setting height and width to oxy_button?

Posted: Mon May 09, 2022 1:34 pm
by alex_jitianu
Hello,
The text field and the button are aligned on baseline.
image.png
The result is not great, but I haven't yet succeeded in finding a CSS combination to align it differently....
You mention that making the button transparent didn't help either. For me it looks like it fixes the issue, because there is no border painted anymore.
image.png

Code: Select all

        oxy_button(
            transparent, true,
            action, oxy_action(
              name, '+',
              description, 'Insert an element after the current one', 
              icon, url('add.png'), 
              operation, 'InsertFragmentOperation', 
              arg-fragment, '<persName xmlns="http://www.tei-c.org/ns/1.0">${caret}</persName>',
              arg-insertLocation, '.',
              arg-insertPosition, 'After')
              )     ;
Does it look differently for you?

Best regards,
Alex