Re: Style CSS Challenge!

Here's a similar approach for masking all but the area of interest of an
image:
http://jsfiddle.net/AnnaGerber/bf2gR/
 
Note that there is a -webkit-mask-image CSS property that can use an SVG
resource as the mask which would help to avoid hardcoding dimensions in
the style, but this is not standard CSS.


The problem with this is that I had to make several assumptions about what
markup the client rendering the annotation will generate to represent the
SpecificResource, and the mask probably won't render properly if an
annotation client generates something different. Basic hints like
background-colour will apply to most HTML elements, however the effect may
not be what the author intended if the client rendering the annotation is
generating completely different markup to what was assumed.

This document describes this issue that I raised at the meeting in Boston
in March last year:

https://dl.dropbox.com/u/8415460/CSSStyleDiscussion.pdf

Even though we now have oa:styleClass in the model, this is only half the
story: We have no way of indicating what markup we are expecting will be
generated, and CSS properties are not universally applicable to all HTML
elements.



I have always thought that specifying style within OA is a hack, but if we
have to have it in the model, I'd recommend it only be used for providing
very basic style hints (like text colour, background colour and the like).
Using pseudo elements to generate masks is something that I'd consider to
be outside the scope of what the OA styles were intended for.

Anna 



On 25/01/13 8:49 AM, "Robert Sanderson" <azaroth42@gmail.com> wrote:

>Hooray, thank you!
>
>So the spec should say that pseudo elements that are defined
>associated with the class associated with the specific resource should
>also be processed, and it would all be good. I think?
>
>Rob
>

Received on Friday, 25 January 2013 06:40:25 UTC