Support custom attributes for (inline) styles #839

Closed
nkuttler opened this Issue Mar 31, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@nkuttler

I need to add the amp-custom attribute to the style tag of inline css for some requests. There are issues that seem related, like #459 and #690. One easy solution for me would be to override the css_inline.html template, but I'd need to be able to pass request data into it.

The {% compress %} tag is confusing me a bit because of the undocumented (?) third argument name, but I think I should be able to modify it to pass data down to the template rendering.

Passing the template context would fix my problem, is that an acceptable approach?

I have seen there is also #294 which looks like it addressed this problem as well.

@karyon

This comment has been minimized.

Show comment
Hide comment
@karyon

karyon May 11, 2017

Contributor

unfortunately i don't know the code well enough and can't say whether that approach is good. you are very much welcome to implement this or take the relevant parts from #294 and make a PR. can you tell me whether this is another use case for the feature requested in #690? in that case i would close it as a duplicate.

Contributor

karyon commented May 11, 2017

unfortunately i don't know the code well enough and can't say whether that approach is good. you are very much welcome to implement this or take the relevant parts from #294 and make a PR. can you tell me whether this is another use case for the feature requested in #690? in that case i would close it as a duplicate.

@karyon karyon added the needinfo label May 11, 2017

@karyon

This comment has been minimized.

Show comment
Hide comment
@karyon

karyon May 27, 2017

Contributor

ping :)

Contributor

karyon commented May 27, 2017

ping :)

@nkuttler

This comment has been minimized.

Show comment
Hide comment
@nkuttler

nkuttler Jun 15, 2017

I ended up hardcoding the attribute into all templates because it's just a little invalid html, and have started a new job. Won't be able to do anything here anytime soon.

I ended up hardcoding the attribute into all templates because it's just a little invalid html, and have started a new job. Won't be able to do anything here anytime soon.

@karyon

This comment has been minimized.

Show comment
Hide comment
@karyon

karyon Jun 15, 2017

Contributor

okay, thanks for the reply. i'll assume this is covered by #690 and close this.

Contributor

karyon commented Jun 15, 2017

okay, thanks for the reply. i'll assume this is covered by #690 and close this.

@karyon karyon closed this Jun 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment