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

Parsing a CSS property with the value defined through a var #116

Open
MarcoManca opened this issue Apr 7, 2022 · 0 comments
Open

Parsing a CSS property with the value defined through a var #116

MarcoManca opened this issue Apr 7, 2022 · 0 comments

Comments

@MarcoManca
Copy link

Hi,
I'm using the jStyleParser library to access the CSS properties of the DOM Elements.
By analysing the background-color value of the html page reported below I realized that the value is not provided because of the var contained within the value; indeed if I remove the var and I set the value it is parsed correctly:

`

<head>

	<title>title</title>		

	<style>

:root { --blue-900: #05285b }

.cssvar { color:#FFF; background-color:var(--blue-900); font-size:16px;}

	</style>

</head>

<body>

	<button class="cssvar">button2</button><br><br>

</body>
`

The library is able to return only the following attributes and values:

[button] => color: #ffffff; font-size: 16px;

I'm using the 4.0.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant