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

Replace Language image references with CSS #3810

Closed
Vailorium opened this issue Aug 2, 2022 · 0 comments · Fixed by #3876
Closed

Replace Language image references with CSS #3810

Vailorium opened this issue Aug 2, 2022 · 0 comments · Fixed by #3876
Assignees

Comments

@Vailorium
Copy link
Contributor

The language icons in various places currently use long conditional statements to display the different images, it would be good to replace these image references with CSS classes instead (where the CSS class is the language + the variant of the language, if any).


Eventually I would like to see this change (language variant icons) to instead be a single line that uses code along the following lines:

if (variant != null && !variant.isEmpty()) {
    // set the img class property to be 'language-variant' (e.g. 'java-android')
} else {
    // set the img class property to be 'language' (e.g. 'java')
}

Then move all of the image file references out to CSS, e.g.

img.java {

}
img.java-android {

}

Originally posted by @JonathanGiles in #3797 (comment)

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 2, 2022
@JonathanGiles JonathanGiles added APIView and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Aug 2, 2022
@JonathanGiles JonathanGiles moved this to 🆕 New in ApiView Aug 2, 2022
Repository owner moved this from 🆕 New to ✅ Done in ApiView Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants