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

Clean up other CSS styles that apply to elements without a class #2420

Closed
4 tasks done
simonw opened this issue Sep 6, 2024 · 3 comments
Closed
4 tasks done

Clean up other CSS styles that apply to elements without a class #2420

simonw opened this issue Sep 6, 2024 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Sep 6, 2024

Following:

There are still some selectors in app.css that apply to everything in a way that could interfere with what plugins need to do.

  • Sort out labels
  • Sort out header / footer
  • Sort out that a img thing
  • Sort out table styles
@simonw
Copy link
Owner Author

simonw commented Sep 6, 2024

Form-specific:

form label {
font-weight: bold;
display: inline-block;
}

What's this about?

a img {
display: block;
max-width: 100%;
border: 0;
}

Also notable: header and footer are much less likely to be used separately by a plugin but they do currently carry styles:

header,
footer {
padding: 0.6rem 1rem 0.5rem 1rem;
background-color: #276890;
background: linear-gradient(180deg, rgba(96,144,173,1) 0%, rgba(39,104,144,1) 50%);
color: rgba(255,255,244,0.9);
overflow: hidden;
box-sizing: border-box;
min-height: 2.6rem;
}

footer {
margin-top: 1rem;
}

@simonw
Copy link
Owner Author

simonw commented Sep 6, 2024

Also tables carry some default styles:

table {
border-collapse: collapse;
}
td {
border-top: 1px solid #aaa;
border-right: 1px solid #eee;
padding: 4px;
vertical-align: top;
white-space: pre-wrap;
}
td.type-pk {
font-weight: bold;
}
td em {
font-style: normal;
font-size: 0.8em;
color: #aaa;
}
th {
padding-right: 1em;
}
table a:link {
text-decoration: none;
}

That white-space: pre-wrap; on <td> has caught me out multiple times before.

@simonw simonw changed the title Clean up additional form styling not yet covered by class=core Clean up other CSS styles that apply to elements without a class Sep 6, 2024
simonw added a commit that referenced this issue Sep 6, 2024
simonw added a commit that referenced this issue Sep 6, 2024
@simonw
Copy link
Owner Author

simonw commented Sep 6, 2024

I'm going to have those table styles only apply to table.rows-and-columns.

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

No branches or pull requests

1 participant