Switch README logo to SVG with light/dark mode support#11415
Merged
Conversation
Use the <picture> element to switch between the standard and reversed Datadog logos depending on GitHub's color scheme, and center the logo.
This comment has been minimized.
This comment has been minimized.
Contributor
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
The merge request has been interrupted because the build 0 took longer than expected. The current limit for the base branch 'master' is 120 minutes. |
Contributor
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Switch the README logo to a
<picture>element withprefers-color-schemesources, and center it.Motivation
SVG are crisp at any size, while the previous PNG file (
dd_horizontal_white.png) wasn't. The_datadog_small.svgare~2 KiBversus tens of KiB for the old PNG.It's hosted on the Datadog CDN
static.datadoghq.com, rather than the imgx provider.The SVG and the choice of the picture element match the expected presskit guidelines.
Note
GitHub provides two mechanisms for light / dark images :
<picture>element withprefers-color-schememedia, which is used here, because it also lets the logo be centered via the wrapping<p align="center">.#gh-light-mode-only/#gh-dark-mode-only), while this is pure markdown, the switch between light and dark mode is a Github only mechanism.