W3C home > Mailing lists > Public > www-style@w3.org > November 2015

Re: [css-scoping] Scoping @font-face defined in shadow DOM

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 11 Nov 2015 15:51:27 -0600
Message-ID: <CAAWBYDAq2xydWxtM=tkOSZn-=FbMo4smm-iXQGBW8Z5Z2GfjrQ@mail.gmail.com>
To: Ryosuke Niwa <rniwa@apple.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
This doesn't address the other issue that I haven't been able to solve
yet, which is font names inheriting down into a shadow where the font
name is defined to be something else entirely.  That is:

<style>
@font-face { font-family: foo; src: local("helvetica"); }
body { font-family: foo; }
</style>
<custom-el>
  <::shadow>
    <style>
    @font-face { font-family: foo; src: local("comic sans"); }
    h1 { font-family: foo; }
    </style>
    <h1>Comic sans heading, yay!</h1>
    <p>Whoops, Comic Sans body text.</p>
  </::shadow>
</custom-el>

There's no way in the current system to make sure that the *inherited*
foo font refers to the outer face, but the specified one on the
heading refers to the inner face.

I'm not sure how to fix this, but until we do, I'm uncomfortable with
allowing any name-declaring things (like @font-face - it declares a
font-name) inside of shadow DOM.

~TJ
Received on Wednesday, 11 November 2015 21:52:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:58 UTC