ComboStrap / combo

Dokuwiki Combo Plugin. Making Web Publication a Breeze
https://combostrap.com
GNU General Public License v2.0
15 stars 3 forks source link

Aligning a grid box overrides the width #65

Closed iainhallam closed 1 year ago

iainhallam commented 1 year ago

I've just used a grid to lay out a pair of boxes, with the left one being 1:4 width. Adding align="right" to the box correctly changes the alignment of the text, but then adds style="width:fit-content'" to the element. (See https://github.com/ComboStrap/combo/blob/8013c4e8c4813b914d67873654546b6bcb99bae3/ComboStrap/TagAttribute/Align.php#LL84C35-L84C35.)

Is the aim for people to only use alignment on a contained text component within the box, or should this test case work:

<grid>
  <box width="1:4" align="right">
Some text
  </box>
  <box>
More text, which doesn't currently start 25% of the way across the page
  </box>
</grid>
gerardnico commented 1 year ago

A grid aligns the boxes one after the other horizontally , you can't really align each box.

It's a convenient wrapper around the grid of bootstrap.

gerardnico commented 1 year ago

To align the text, you use the text-xxxx align attribute

https://combostrap.com/howto/how-to-align-a-text-ycx20dew#end

iainhallam commented 1 year ago

Thanks! That's got it.

gerardnico commented 1 year ago

And to align a box at the right side inside a grid you need another nested box

<grid>
   <box>
      <box align="end">
      </box>
   </box>
</grid>

....