oslc-core message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [oslc-core] Issue: Relative Length Units
- From: Martin P Pain <martinpain@uk.ibm.com>
- To: Samuel Padgett <spadgett@us.ibm.com>
- Date: Fri, 30 May 2014 09:54:21 +0100
In CSS terms, pixel values are relative
units. The link in the text you copied [1] states:
"Relative units are:
- em: the 'font-size'
of the relevant font
- ex: the 'x-height' of the relevant font
- px: pixels, relative to the viewing device
...Pixel units are
relative to the resolution of the viewing device, i.e., most often a computer
display. If the pixel density of the output device is very different from
that of a typical computer display, the user agent should rescale pixel
values. ... It is recommended that the reference pixel be the visual
angle of one pixel on a device with a pixel density of 96dpi and a distance
from the reader of an arm's length."
I don't know if anything calculates
reference pixel values like that, but by the wording of our spec and the
CSS spec pixel values are allowed for the height and width values of previews
and dialogs.
However your comment does appear to
be correct, about the reference to "default system font (at 100% size)"
being incorrect.
[1] http://www.w3.org/TR/2009/CR-CSS2-20090423/syndata.html#length-units
Martin Pain
Software Developer - Green Hat
Rational Test Virtualization Server, Rational Test Control Panel
OASIS Open Services for Lifecycle Collaboration - Automation technical
committee chair
IBM United Kingdom Limited
Registered in England and Wales with number 741598
Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
<oslc-core@lists.oasis-open.org> wrote on 29/05/2014
19:35:40:
> From: Samuel Padgett <spadgett@us.ibm.com>
> To: "OASIS OSLC Core TC Discussion List"
<oslc-core@lists.oasis-open.org>,
> Date: 29/05/2014 19:35
> Subject: [oslc-core] Issue: Relative Length Units
> Sent by: <oslc-core@lists.oasis-open.org>
>
> I have some doubts about our use of relative length units for
> delegated UIs in OSLC.
>
> In OSLC 2.0, widths and heights for dialogs and resource previews
> must always use relative length units [1] [2] [3]. We make the
> additional statement that em and ex units are relative to the
> default system font. For instance,
>
> "Height size MUST be expressed in relative length
units as defined in the
> W3C Cascading Style Sheets Specification (CSS 2.1) Em and ex
units
> are interpreted relative to the default system font (at 100% size)"
>
> The second sentence to me seems to contradict the first. In CSS, em
> is calculated relative to the font size of the parent element, not
> the system font. As a dialog consumer, how do I adjust for the difference?
>
> The other issue I see is that I can't accurately size myself as a
> dialog since I have no idea what font size is used on the emedding
> (outer) page. If the outer page uses a larger font than me, my
> dialog will be bigger than I want. If the outer page uses a smaller
> font, the dialog will be smaller than I want. It's not based on my
> content and font, but the font of the outer page.
>
> The real OSLC implementations I've seen just ignore all this and use
> px values. I did some searching and couldn't find any history for
> why we require relative units.
>
> I propose we remove the requirement and simply say use any valid CSS
> length value.
>
> [1] http://open-services.net/bin/view/Main/OslcCoreUiPreview?
> sortcol=table;up=#Resource_Preview
> [2] http://open-services.net/bin/view/Main/OslcCoreSpecification?
> sortcol=table;up=#Resource_Dialog
> [3] http://open-services.net/bin/view/Main/OslcCoreSpecification?
> sortcol=table;table=up#Dialog_Resizing
>
> --
> Samuel Padgett | IBM Rational | spadgett@us.ibm.com
> Eclipse Lyo: Enabling tool integration with OSLC
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]