Overview:
The {roundrect} macro allows you to quickly and easily create rounded rectangles
There are times when you want to put a box around some content but want that box to have rounded corners, this macro allows you to do that.
Parameters:
This macro is used as shown below:
{roundrect:title=myTitle}body content{roundrect}
| Parameter | Default | Required | Notes |
|---|---|---|---|
| bgcolor | #C0FFC0 | The background colour of the rounded rectangle, this should be specified as a hex value | |
| title | The contents of the title cell, if required | ||
| footer | The contents of the footer cell, if required | ||
| width | fit contents | By default, the panel width will stretch to fit it's contents, unless you specify a specific width | |
| height | fit contents | By default, the panel height will stretch to fit it's contents, unless you specify a specific height | |
| cornersize | 25px | The radius, in pixels, of the panel corners. This sets the defaults for the hSize and vSize parameters below. | |
| hSize | cornersize | This parameter, which defaults to the value defined by cornersize, defines the width of the panel corners. | |
| vSize | cornersize | This parameter, which defaults to the value defined by cornersize, defines the height of the panel corners. | |
| antialias | false | Setting the antialias parameter will result in much smoother corners and enable the cornercolor parameter | |
| footerbgcolor | bgcolor | The background colour of the footer area (defaults to the same colour as the overall background colour bgcolor), this should be specified as a hex value | |
| titlebgcolor | bgcolor | The background colour of the title area (defaults to the same colour as the overall background colour bgcolor), this should be specified as a hex value | |
| corners | true,true,true,true | a comma separated list of flags stating which corners should be rounded: Top Left, Top Right, Bottom Left, Bottom Right | |
| rows | true,true,true | a comma separated list of flags stating which rows should be displayed: Top, Middle, Bottom | |
| class | a list of classes to be applied to the roundrect table |
Examples
Hints and Tips
You can control the color of the text within round rectangles, as well as the alignment of content within the header, body and footer areas using the following css.
/* roundrect title & footer positions */
td.roundrect_title {
text-align:left !important;
vertical-align:top !important;
padding-top:9px !important;
}
td.roundrect_body {
text-align:left !important;
vertical-align:top !important;
color:#FFFFFF !important;
}
td.roundrect_title td, td.roundrect_title p, td.roundrect_title a, td.roundrect_title ul, td.roundrect_title li,
td.roundrect_body td, td.roundrect_body p, td.roundrect_body a, td.roundrect_body ul, td.roundrect_body li,
td.roundrect_title td, td.roundrect_footer p, td.roundrect_footer a, td.roundrect_footer ul, td.roundrect_footer li {
color:#FFFFFF !important;
}
td.roundrect_footer {
text-align:right !important;
vertical-align:bottom !important;
padding-bottom:6px !important;
}















Comments (19)
Oct 26, 2006
Anonymous says:
Where do I add the CSS?Where do I add the CSS?
Oct 27, 2006
Guy Fraser says:
If you're using the [Builder Theme] just add it to the CSS Custom Styles...If you're using the [Builder Theme] just add it to the CSS Custom Styles setting in theme config. Alternatively, you can use the style macro on the page where you have the roundrect.
Nov 02, 2006
Anonymous says:
bgimage property would be really useful in this macro, enabling users to create ...bgimage property would be really useful in this macro, enabling users to create nice-looking buttons
Nov 10, 2006
Guy Fraser says:
You can probably already do this using CSS - if you view the HTML source you'll ...You can probably already do this using CSS - if you view the HTML source you'll see the class names we've added to pretty much each bit of markup within the roundrect and can use that to add CSS specifying the bg image. However, the corners would likely not be round if you added a bg image to the entire table as the default is to have transparent corners rather than simply overlaying with white gifs.
Aug 19, 2008
Rafael Cerioli says:
Why do I have problems rendering antialiased rectangles ? (Is it normal?) Tha...Why do I have problems rendering antialiased rectangles ? (Is it normal?)
Thanks !
Jan 27, 2009
Juha Lindfors says:
Something to do with it using flash to implement anti-aliasing I think. It is ju...Something to do with it using flash to implement anti-aliasing I think. It is just too brittle a solution to work consistently across different browser platforms.
Aug 04, 2009
Swen Koenig says:
Hi! I'm using the roundrect macro within a {section}{column}. Neither {roundrect...Hi! I'm using the roundrect macro within a {section}{column}.
Neither {roundrect}{center}Text{center}{roundrect} nor with {style}css{style} the text isn't placed correctly at the middle. With align:right the text is neither placed correctly at the right.
The problem does not appear, when I set antialasing true. However I have many roundrects on the page, so that with antialasing the page needs several secends to load, which is to much.
Thanks for your answers!
Swen
Oct 12, 2010
VenkataRao Giduturi says:
Hi, In the documentation provided as List of Installed macros in confluence (w...Hi,
In the documentation provided as List of Installed macros in confluence (we are using version 2.9) this macro has been syntaxed as
"{roundrect:title=Some Title}Some content{lozenge}". In this syntax Lozenge is appearing. This needs to be corrected.
Venkat
Oct 08, 2010
Samael Bate says:
The syntax you've used: {roundrect:title=Some Title}Some content{lozenge} has ...The syntax you've used:
{roundrect:title=Some Title}Some content{lozenge}has no {roundrect} on the end which prevents it rendering correctly. It should be used like this:
{roundrect:title=Some Title}Some content {lozenge}{roundrect}If you wish to display the markup for lozenge rather than the actual macro, use a slash:
{roundrect:title=Some Title}Some content \{lozenge}{roundrect}Oct 12, 2010
VenkataRao Giduturi says:
Hi Samael, I was just informaing that this is a syntax mistake shown in documen...Hi Samael,
I was just informaing that this is a syntax mistake shown in documentation in "List of Macros installed". This needs to be corrected there.
Venkat
Oct 13, 2010
Samael Bate says:
Hi Venkat, Thanks for letting us know. I'll make sure this gets fixed for the ...Hi Venkat,
Thanks for letting us know. I'll make sure this gets fixed for the next release.
Edit: This has already been fixed in Content Formatting Macros v1.6.16
Oct 15, 2010
Adolfo Casari says:
Hi, I am using this macro, but I noticed that there is a line at the bottom, as ...Hi, I am using this macro, but I noticed that there is a line at the bottom, as shown in this screenshot:
Any hints?
Oct 15, 2010
Samael Bate says:
Thanks for the feedback. This bug has been reported and will be fixed in a futu...Thanks for the feedback. This bug has been reported and will be fixed in a future release.
Nov 22, 2010
Ulrich Kuhnhardt says:
Hello Adolfo, the bottom line is rendered with line-height=1.3 (standard conflu...Hello Adolfo,
the bottom line is rendered with line-height=1.3 (standard confluence)
If that is applied to the left and right bottom images (quarter circle) the disturbing line at the bottom appears that makes the roundrect look like an Egyptian cartouche.
Please monitor plugins.atlassian.com for the next release of the content formatting plugin or (if you are tech-savvy)
Nov 24, 2010
Adolfo Casari says:
Thank you, I changed that and now it works.Thank you, I changed that and now it works.
Nov 24, 2010
Adolfo Casari says:
Thank you, I changed that and now it works.Thank you, I changed that and now it works.
Jan 19, 2011
Bruno Blaise says:
{center}{roundrect:bgcolor=00a044}Some Content{roundrect}{center} doesn't...{center}{roundrect:bgcolor=00a044}Some Content{roundrect}{center}doesn't show any color in the background. I'm using Confluence 3.4.6.
Jan 24, 2011
Samael Bate says:
This is working for me. It may be due to some other factors. Try the markup on...This is working for me. It may be due to some other factors. Try the markup on a new page using Confluence's default layout to see if the problem still occurs.
May 18, 2011
Lis Riba says:
Atlassian has a bug on this issue - it seems that the CSS for the Documentation ...Atlassian has a bug on this issue - it seems that the CSS for the Documentation theme overrides any background color on roundrects.
See [CONF-20248], and consider voting it up so they know how many installations are affected.
Further discussion in this forum topic