Bug 143535 - Introduce option for corner radius
Summary: Introduce option for corner radius
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.4.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 90165 (view as bug list)
Depends on:
Blocks: Table-Borders
  Show dependency treegraph
 
Reported: 2021-07-25 12:20 UTC by csongor
Modified: 2021-08-16 12:56 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
desired feature for rounded table border (3.67 KB, image/png)
2021-08-10 09:28 UTC, csongor
Details
Rounded border around individual cells (2.91 KB, image/png)
2021-08-10 09:32 UTC, csongor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description csongor 2021-07-25 12:20:09 UTC
I would like to define a border radius for a table border.

Now only straight, or potentially dotted-dashed lines can produce table borders. 

I would like to see my tables with a rounded border and I would like to specify the border radius for this. 

The work-arounds I can come up with, like adding a rounded ractangle shape to the document, are not good because the shape doesn't change as the table is growing.
Comment 1 Dieter 2021-08-09 17:00:35 UTC
Csongor, thank you for your idea. I'm not sure, if I understand it. If you hve rounded cell borders, you also have rounded cells, correct. I'm not sure, if this is - by definition - still a table. Is it possible to attach am image of such a table? 
=> NEEDINFO
Comment 2 csongor 2021-08-10 09:27:17 UTC
Here is how I would do it in HTML:

```
table {
  border-collapse: separate;
  border-spacing: 0.2em;
  border-radius: 1em;
  border: 1px solid black;
  margin: 3em;
}

td {
  padding: 0.5em;
}

<table>
  <tr><td>a</td><td>alfa</td></tr>
  <tr><td>b</td><td>beta</td></tr>
</table>
```

I upload a screenshot too.
Comment 3 csongor 2021-08-10 09:28:22 UTC
Created attachment 174174 [details]
desired feature for rounded table border

The file shows a 2x2 table with rounded border. 

I cannot do this in LO Writer.
Comment 4 csongor 2021-08-10 09:30:32 UTC
Rounding the individual cells also would be nice. 

Here is the CSS for it:

table {
  border-collapse: separate;
  border-spacing: 0.2em;
  margin: 3em;
}

td {
  padding: 0.5em;
  border-radius: 0.3em;
  border: 1px solid black;
}
Comment 5 csongor 2021-08-10 09:32:01 UTC
Created attachment 174175 [details]
Rounded border around individual cells

This would also a useful and good-looking feature to have.
Comment 6 Dieter 2021-08-10 09:53:11 UTC
Thank you for clarification. I'm not sure, if I would call it borders (of the cell)), because actually there is no option to have a table with space between the cells.

cc: Design-Team for further input and decision. 

Propably duplicate of bug 90165.
Comment 7 csongor 2021-08-10 12:17:50 UTC
There seem to be two different requests then:

1. 
Make it possible to have rounded corners for the whole table.

2.
Make it possible to have rounded corners for the individual cells. 


The 1st request is still a table and if I understand correctly, it is doable. 

The 2nd one is a matter of judgement whether we think it is a table or not. I think it is, HTML standard also thinks it is. 

Even in Writer, if I apply Style="Double thin" and Witdh="9pt" border to the whole table, I get individually bordered cells. They are just not rounded. 

So, I think it should also be considered as table. Maybe it requires more development then.
Comment 8 Heiko Tietze 2021-08-11 08:42:44 UTC
It's rather not the table cell but border around a paragraph that could have a radius. But first it needs to be defined in the ODF.

Regina/Thorsten, what do you think? It could also improve the compatibility with HTML. Quite a large change OTOH since shadow also needs to be rounded consequently.
Comment 9 Heiko Tietze 2021-08-11 10:16:12 UTC
*** Bug 90165 has been marked as a duplicate of this bug. ***
Comment 10 csongor 2021-08-11 12:06:07 UTC
> It's rather not the table cell but border around a paragraph that could have a radius.

It is the same only in the case when there is one paragraph in each cell. In my example, this was the case but it is not always so. Thus, I would still say the _cells_ should have rounded border, not the paragraphs. 

A rounded border for paragraphs would also be a nice feature but it is beyond the scope of this ticket. This ticket is only about the border of the individual cells and the whole table. 

By the way, such a feature would be useful not for Writer only. It would be useful for Writer/Web too because HTML, the target format of Writer/Web also supports rounded borders.
Comment 11 Heiko Tietze 2021-08-16 08:07:49 UTC
Tables organize content in rows/cols, the styling belongs to the paragraph IMO. I'm not opposed to a solution where all border may have a radius but limiting the request to tables makes no sense to me. This would be rather a dynamic diagram (aka SmartArt).

Btw, adding a radius also requires padding making the whole UI a bit complex. But it's also requested for PDF export as media-/crop-/bleedbox etc. in bug 103683.

NEEDINFO for dev input.
Comment 12 csongor 2021-08-16 08:25:53 UTC
(In reply to Heiko Tietze from comment #11)
> Btw, adding a radius also requires padding making the whole UI a bit
> complex. 

Padding is already there: Table Properties -> Borders -> Padding. It is a table-level setting, I mean, it refers to each cell of the table. 

Is this what you wanted?
Comment 13 Heiko Tietze 2021-08-16 08:32:00 UTC
Padding and margin. Depending on what reference you have, the current padding would be a margin to the paragraph.

[Document] < M|B|P < [Page] < M|B|P < [Paragraph] < M|B|P < [Table] < M|B|P < [Table Content]

with M|B|P = Margin, Border, Padding
Comment 14 Regina Henschel 2021-08-16 09:54:11 UTC
(In reply to Heiko Tietze from comment #13)
> Padding and margin. Depending on what reference you have, the current
> padding would be a margin to the paragraph.

Padding is always distinct from margin. So you get the stacking
table cell border
table cell padding
paragraph margin
paragraph border
paragraph padding
paragraph content

Margin background is always transparent. Padding background is background of the element.


From specification view, I see no problem with a border-radius attribute. "border-radius" is a CSS3 property. Its specification is already CR, so when including it in ODF, it would likely be finished.
https://drafts.csswg.org/css-backgrounds/#border-radius
And the property is widely supported by browsers
https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#browser_compatibility


The only problem is to find someone to implement it.

I would say, it is a valid enhancement request.