Let's say that I have a CSS code written by a user like this:
.some-classname {
color: red;
padding: 32px;
background-color: hotpink;
font-size: 24px;
border-radius: 4px;
font-family: 'test font family', serif;
@media screen (max-width: 500px) {
font-size: 25px;
}
I want to store this CSS into an SQL table with two columns, id would be the id of some page on my app, and css which will hold the code above.
the application will query this css string and print it into the page in the head tag between style tags.
Are there any drawbacks and security issues for doing this? note that the user can write any css code that will be stored in the database
Its' a general purpose question