amp.dev icon indicating copy to clipboard operation
amp.dev copied to clipboard

Refine list of disallowed and restricted CSS

Open ericlindley-g opened this issue 9 years ago • 6 comments

*-selector and :not(), for instance are not currently validated (spec)

Options: Actually enforce these in the validator (not recommended — some of these are good to have) Update documentation to distinguish "not recommended" CSS from "restricted" and "disallowed" CSS

ericlindley-g avatar Mar 14 '17 20:03 ericlindley-g

I would lump overflow into this list as well, which is a big pain point for me, as overflow works outside the viewer but not in the viewer :(

On Wed, Mar 15, 2017, 7:21 AM ericlindley-g [email protected] wrote:

*-selector and :not(), for instance are not currently validated (spec https://www.ampproject.org/docs/guides/author-develop/responsive/style_pages )

Options: Actually enforce these in the validator (not recommended — some of these are good to have) Update documentation to distinguish "not recommended" CSS from "restricted" and "disallowed" CSS

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ampproject/docs/issues/373, or mute the thread https://github.com/notifications/unsubscribe-auth/AACn_I3qrDxQ1NqWuFWcxErkSDQLkMgbks5rlva5gaJpZM4MdGlv .

pbakaus avatar Mar 14 '17 21:03 pbakaus

http://www.telerik.com/blogs/css-tip-star-selector-not-that-bad

I dont see a huge upside for banning star and not selectors. The performance impact is almost negligible.

camelburrito avatar Mar 14 '17 22:03 camelburrito

#367 is covering similar * ground. Is there an issue with encapsulation or is it just performance?

timBrockman avatar Mar 14 '17 22:03 timBrockman

Correct, https://github.com/ampproject/docs/issues/367 is meant to address it:

  • Universal selectors are no longer disallowed
  • Neither are not() selectors
  • We are tracking overflow changes/fixes in a separate bug. So let's just focus on selectors here.

dvoytenko avatar Mar 17 '17 19:03 dvoytenko

It looks like the doc was updated on March 17 in https://github.com/ampproject/docs/commit/d137fda90bb6bf854aa980c80b6e089496ae02a3 and removed the items that are no longer disallowed.

@ericlindley-g - Can we close this issue?

ghost avatar May 05 '17 14:05 ghost

I think so — /cc @dvoytenko to confirm that the right rules are removed and re-open if anything needs to be changed (since I can't seem to find the review for these changes)

ericlindley-g avatar May 05 '17 14:05 ericlindley-g