W3C home > Mailing lists > Public > spec-prod@w3.org > October to December 2012

Re: Custom Style

From: Giuseppe Pascale <giuseppep@opera.com>
Date: Fri, 14 Dec 2012 15:25:59 +0100
To: "James Craig" <jcraig@apple.com>
Cc: spec-prod@w3.org
Message-ID: <op.wpa81ly26ugkrk@giuseppep-x220>
On Thu, 13 Dec 2012 19:20:19 +0100, James Craig <jcraig@apple.com> wrote:

> On Dec 12, 2012, at 11:58 PM, Giuseppe Pascale <giuseppep@opera.com>  
> wrote:
>> On Thu, 13 Dec 2012 01:12:56 +0100, James Craig <jcraig@apple.com>  
>> wrote:
>>> On Dec 12, 2012, at 7:02 AM, Giuseppe Pascale <giuseppep@opera.com>  
>>> wrote:
>>>> What is the best way nowadays to define custom styles for ReSpec  
>>>> documents, now that extraCSS config parameter is deprecated? In  
>>>> particular, I'm working on a NON W3C document, and I want to tweak  
>>>> the "unofficial" stylesheet. Using <link> or <style> doesn't seem to  
>>>> work since the respec style takes precedence.
>>> <link> works for me. You just have to make sure the cascade does not  
>>> conflict, because the ReSpec CSS is appended after your linked CSS  
>>> file.
>> yes, but this is exactly what I need to do, replace some of the things  
>> in the default template. Forgot to mention that.
>> Anyway adding a style block after the <body> did the trick
> You can still use <link>… You just need to do your overrides with a  
> higher selector specificity than the ReSpec style sheet. You might also  
> try removing the ReSpec CSS from the extraCSS array, and hard code the  
> <link> for both style sheets.
Thanks for the hints.

for the record, in my case I was modifying the <body> background and what  
I was trying to override is not in the respec CSS but the "unofficial  
template" from w3c (that is inserted via script by ReSpec IIRC).

btw if one would like to create a completely new template (so not only CSS  
but also boilerplate etc) for other uses, is there something in the  
current structure that allows that or do I need to patch respec? Use case  
is use respec for company documents or for other organizations

I remember reading that there was a plan to modify ReSpec to be suitable  
for other uses, but I'm not sure if that was only a plan for the future or  
something that is in the latest release.

Giuseppe Pascale
Product Manager TV & Connected Devices
Opera Software
Received on Friday, 14 December 2012 14:26:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:55:17 UTC