Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324427 - [Theming] Border support not consistent
Summary: [Theming] Border support not consistent
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-03 10:27 EDT by Stefan Röck CLA
Modified: 2014-11-25 04:30 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Röck CLA 2010-09-03 10:27:32 EDT
It would be nice if the most common css border definitions are supported.
In the following example, border-bottom works, but border-top throws an error ("unknown property")

Button[PUSH] {
	border-bottom: 1px;
	border-top : 1px;
}
Comment 1 Ralf Sternberg CLA 2010-09-07 12:22:28 EDT
The properties "border-bottom", "border-top", etc. are not supported by most widgets, only the shorthand "border". We support only those properties that are listed in the *.theme.xml (and also listed in the theming reference).
You could rewrite your code like this:

Button[PUSH] {
  border: 1px 0 1px 0;  /* top right bottom left */
}

or, in the short form:

Button[PUSH] {
  border: 1px 0;  /* top/bottom right/left */
}

If you are requesting support for common individual properties AND shorthands, please change the summary accordingly. This would affect all widgets, not only Button.
Comment 2 Stefan Röck CLA 2010-09-07 12:28:08 EDT
Hi Ralf,
I just tried what you suggested and got the following error:

org.w3c.css.sac.CSSException: Failed to read property border: Failed to parse color 0 DIM 1.0px 0

I am using RAP 1.3 Maintenance Branch - What's wrong here?
Comment 3 Ralf Sternberg CLA 2010-09-09 03:34:17 EDT
Hi Stefan, it's right, you have to replace "0" with "0px" in RAP. In CSS, you can omit the unit for zero values. This doesn't work in RAP. I opened bug 324820.
Comment 4 Ralf Sternberg CLA 2010-09-09 03:43:06 EDT
Hold on, I was completely misdirected. My snippet was non-sense, I apologize. What I wrote works for margin and padding, but not for borders. It would work for border-width, but this property is not yet supported. We currently cannot deal with different border widths for the different edges. See bug 283872.
Comment 5 Ivan Furnadjiev CLA 2014-11-25 04:30:41 EST
Four border edges are supported since RAP 3.0 M2.