Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Oct 23, 2024

Describe your changes

Cleans up our globalStyles.ts file by removing old & unused styles. This also refactors our markdown test and fixes audio input to use the link color defined in the theme instead of primary.

Testing Plan

  • Update markdown e2e test

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@lukasmasuch lukasmasuch added security-assessment-completed Security assessment has been completed for PR impact:internal PR changes only affect internal code change:refactor PR contains code refactoring without behavior change labels Oct 23, 2024
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the link color to use the defined link color in our theme.

@lukasmasuch lukasmasuch changed the title Clean up global styles 2 Clean up global styles - part 2 Oct 23, 2024
@lukasmasuch lukasmasuch marked this pull request as ready for review October 23, 2024 07:45
Comment on lines +67 to +70
export const StyledNoMicInputLearnMoreLink = styled.a(({ theme }) => ({
color: theme.colors.linkText,
textDecoration: "underline",
}))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think we should probably have one top-level styled component to import these general ones from, as styled.a is not unique to the AudioInput. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't really any other styled component yet with the exact same settings. Markdown uses the same settings but has CSS within the markdown-styled component. I will look into links again in a subsequent PR since there are a few more aspects to clean up around link stylings.

Comment on lines 299 to 302
// And undo these styles for placeholder links/named anchors (without href).
// It would be more straightforward to just use a[href] in previous block, but that
// causes specificity issues in many other styles that are too complex to fix.
// See https://github.com/twbs/bootstrap/issues/19402
a:not([href]):not([class]) {
&,
&:hover {
color: inherit;
text-decoration: none;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be ported over to styled-components. Was this never used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted this for now. I will look into this in a subsequent PR

// Remove border from iframe
iframe {
border: 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iframe border none is already set in global styles above

@lukasmasuch lukasmasuch merged commit 0c9ff71 into develop Nov 2, 2024
@lukasmasuch lukasmasuch deleted the refactor/clean-up-global-styles branch November 2, 2024 08:03
edegp pushed a commit to edegp/streamlit that referenced this pull request Jan 19, 2025
## Describe your changes

Cleans up our globalStyles.ts file by removing old & unused styles. This
also refactors our markdown test and fixes audio input to use the link
color defined in the theme instead of primary.

## Testing Plan

- Update markdown e2e test

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this
project are made under the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:refactor PR contains code refactoring without behavior change impact:internal PR changes only affect internal code security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants