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

Move ft-list-channel specific css to ft-list-channel.scss #4873

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Apr 4, 2024

Move ft-list-channel specific css to ft-list-channel.scss

Pull Request Type

  • Cleanup

Description

This pull request move CSS that is only used by the ft-list-channel component into the ft-list-channel.scss file from the _ft-list-item.scss file. Not only does this make it easier to find when someone looks for it in the future, it also reduces the CSS output (renderer.[hash].css) by 2777 bytes.

Why does the output shrink just by copying it from one file to another?

SCSS' @use directive copies the referenced CSS into the file that has the @use directive, that means it is copied into 5 files/components ft-list-video, ft-list-channel, ft-list-playlist, ft-list-hashtag and ft-community-post. That copying is good, because it means we have consistent styling across our list components and Vue can correctly scope the CSS to the component. In this case however, it's CSS that is only used in one of those five components, so it doesn't make sense to copy it into the other four.

Testing

Search for a channel (e.g. MrBeast) and check that it appears correct in the search results.

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.20.0

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) April 4, 2024 21:57
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 4, 2024
@FreeTubeBot FreeTubeBot merged commit 8b16bd5 into FreeTubeApp:development Apr 6, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 6, 2024
@absidue absidue deleted the ft-list-channel-css branch April 6, 2024 06:13
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

Successfully merging this pull request may close these issues.

5 participants