as-ideas / oil

191 stars 56 forks source link

add class names to oil top level element based on the currently visible panel #282

Closed atoiv closed 3 years ago

atoiv commented 5 years ago

Current situation

Top level oil element (div.as-oil) does not contain information about the currently visible panel. The second level element (div.as-oil-content-overlay) has this information (either as class .oil-nocookies; id="as-oil-cpc; or data data-qa="oil-full").

Proposed functionality

Add the same information found on second level element (classes, ids and data) also to the first level element.

Motivation

This would allow styling all oil elements in dom with css alone.

Different oil panels have vastly different use cases from each other, and could need completely different styling.

Example use case is .oil-nocookies panel that is actually an information banner, intended only for one directional information sharing, unlike most of the other panels that are intended for user interaction.