w3c / picture-in-picture

Picture-in-Picture (PiP)
https://w3c.github.io/picture-in-picture
Other
309 stars 38 forks source link

Do we need a new CSS media query for future use cases? #92

Closed zouhir closed 6 years ago

zouhir commented 6 years ago

Glad to see this shipped in Chrome! in the last day or so I saw a lot of great reaction from the press and bloggers about it, congrats!

In today's scenarios (scenario 1):

I do believe no extra CSS effort is needed, but for future expansion, when supporting a document fragment, do we need to change anything?

browser 1

Future use cases (scenario 2):

Looking at today's web community reaction in blogs & press, I can see a lot of love and willingness to adapt it! are we going to see:

In my personal opinion, as a web developer, I will be facing a little confusion in:

Suggestion (is it an overkill 😅)?

picture-in-picture media query

Detect and modify the styles of elements in PiP overlay window with a media query

 @media picture-in-picture and (max-width: 160px) {...}
 @media picture-in-picture and (min-width: 560px) {...}

:in-pip pseudo CSS class

Trigger in-pip to change things in the original doc fragment.

.original-doc-fragment:in-pip {
    opacity: 0.3; 
}
beaufortfrancois commented 6 years ago

Thank you @zouhir.

As we've talked at TPAC, I'm closing this as I've just added the arbitrary-dom label. We'll revisit this when we start thinking about allowing arbitrary DOM elements to request Picture-in-Picture.

tomayac commented 5 years ago

We’ll revisit this when we start thinking about allowing arbitrary DOM elements to request Picture-in-Picture.

Oh, I think this moment is now: https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/blink-dev/uK0hyACy_fg/XXFsm_4kDAAJ

beaufortfrancois commented 5 years ago

@beccahughes @mounirlamouri Shall we reopen?

mounirlamouri commented 5 years ago

I'm not sure we would need this given that we have :picture-in-picture and the document in PIP will have its own stylesheet.

beccahughes commented 5 years ago

Yes we will not need this