Skip to content

Conversation

@connorjclark
Copy link
Collaborator

Fixes #9155.

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice this worked out nicely and super cleanly!

worth a test?

* @param {Function} cb
*/
_setLightThemeTemporarily(cb) {
const isDark = this._dom.find('.lh-vars', this._document).classList.contains('dark');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yikes 😆 I wonder if we should use a variable or something in ReportUIFeatures state...

misread and realized this was testing classList and not textContent but a function or something that encapsulates this might be nice

Copy link
Contributor

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like what @media print was made for? We couldn't do expansion that way because audit content is in <details> elements, but seems like this would be possible?

@connorjclark
Copy link
Collaborator Author

connorjclark commented Jun 10, 2019

How could a media rule unapply the .dark rules?

is @media not print { supported?

EDIT: yeah that works

@brendankenny
Copy link
Contributor

How could a media rule unapply the .dark rules?

217b768

:P

@patrickhulce
Copy link
Collaborator

image

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all kidding aside, I do think @hoten 's old approach would be a great candidate for the expansion business to avoid mucking up the selection state!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Printing in dark mode should not be possible

4 participants