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

CSS is overwriting other CSS in my application #138

Open
joshduchamp opened this issue Nov 9, 2023 · 2 comments
Open

CSS is overwriting other CSS in my application #138

joshduchamp opened this issue Nov 9, 2023 · 2 comments

Comments

@joshduchamp
Copy link

I installed lforms by downloading version 34.2 from https://clinicaltables.nlm.nih.gov/lforms-versions. The styles.css file has a lot of attributes that affect styling across my entire web application, outside of just the lform library. When looking in the css, I see a lot of styles directly applied to html elements without specifying classes. Below is a small snippet showing some examples, but it's fairly extensive when looking through the css.

dl,h1,h2,h3,h4,h5,h6,ol,p,pre,ul{margin-top:0}address,dl,ol,p,pre,ul{margin-bottom:1em}button,hr,input{overflow:visible}pre,textarea{overflow:auto}dd,h1,h2,h3,h4,h5,h6,legend{margin-bottom:.5em}

@plynchnlm
Copy link
Member

I suspect those settings are coming from lforms' use of antd components. I am not sure there is a good solution for that. We might turn on the encapsulation option, but what that would do to antd I don't know offhand. Also, some users like to customize the CSS of lforms, and if we encapsulate it, I am not sure that would still be possible. However, I do understand it could be an annoyance to have to reset a bunch of styles that antd is setting. We will look into it.

@joshduchamp
Copy link
Author

Thanks @plynchnlm. I'll move forward with customizing the CSS.

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

2 participants