Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createStyleSheet.createMediaQueryRule #14

Open
lindelwa122 opened this issue Sep 28, 2023 · 0 comments
Open

createStyleSheet.createMediaQueryRule #14

lindelwa122 opened this issue Sep 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@lindelwa122
Copy link
Owner

createStyleSheet.createMediaQueryRule

createStyleSheet

The createStyleSheet module facilitates the creation and application of CSS styles to elements. It's important to note that this module isn't intended to replace traditional CSS, but rather to provide an API for efficiently adding CSS rules to elements using JavaScript when it's the most suitable approach.

createMediaQueryRule

The createMediaQueryRule function is a private function intended to be used by createCSSRule. While I am not sure about the exact implementation details, it is expected to receive an object as input with a structure similar to the one below:

{
    "@media screen and (min-width: 300px)": {
         "body": {
             backgroundColor: "red",
          },
    },
}

Based on this input, the function should appropriately apply styles to elements within the specified media query. However, it's important to note that this function is not a priority, as achieving the same result can be easily done with traditional CSS. This module is not intended to replace CSS but to assist developers in adding styles when using CSS is not the most suitable option.

@lindelwa122 lindelwa122 added the enhancement New feature or request label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant