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

SCSS variable cleanup in prep for Docsy upgrade #2440

Merged
merged 1 commit into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 17 additions & 131 deletions assets/scss/_registry.scss
Original file line number Diff line number Diff line change
@@ -1,138 +1,24 @@
.registry {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The use of these styles are nowhere to be found, including in the commit that introduced them:

display: block;

&__main {
min-width: 100%;
margin: $registry-vertical-margin 0;
.badge {
@each $component, $color in $otel-component-colors {
&.badge-#{$component} {
color: white;
background-color: $color;
}
}

&__search {
min-width: 100%;
margin: $registry-vertical-margin 0;
&.badge-elixir {
color: map-get($otel-component-colors, erlang);
background-color: inherit;
border: solid 1px;
}

&__header {
background-color: $green;
&.badge-js {
color: inherit;
}
}

.badge.badge-collector {
color: white;
background-color: $collector;
}

.badge.badge-core {
color: white;
background-color: $core;
}

.badge.badge-instrumentation {
color: white;
background-color: $instrumentation;
}

.badge.badge-exporter {
color: white;
background-color: $exporter;
}

.badge.badge-extension {
color: white;
background-color: $extension;
}

.badge.badge-receiver {
color: white;
background-color: $receiver;
}

.badge.badge-processor {
color: white;
background-color: $processor;
}

.badge.badge-utilities {
color: white;
background-color: $utilities;
}

.badge-tracer {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no tracer component, so this style was never used.

color: white;
background-color: $dark-blue;
}

.badge-instrumentation {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is missing the .badge context, and so was never used.

color: white;
background-color: $green;
}

.badge.badge-dotnet {
color: white;
background-color: $dotnet;
}

.badge.badge-cpp {
color: white;
background-color: $cpp;
}

.badge.badge-elixir {
color: $erlang;
background-color: inherit;
border: solid 1px;
}
.badge.badge-erlang {
color: white;
background-color: $erlang;
}

.badge.badge-go {
color: white;
background-color: $go;
}

.badge.badge-java {
color: white;
background-color: $java;
}

.badge.badge-js {
color: inherit;
background-color: $javascript;
}

.badge.badge-kotlin {
color: $java;
background-color: inherit;
border: solid 1px;
}

.badge.badge-lua {
color: white;
background-color: $lua;
}

.badge.badge-php {
color: white;
background-color: $php;
}

.badge.badge-python {
color: white;
background-color: $python;
}

.badge.badge-ruby {
color: white;
background-color: $ruby;
}

.badge.badge-rust {
color: white;
background-color: $rust;
}

.badge.badge-swift {
color: white;
background-color: $swift;
&.badge-kotlin {
color: map-get($otel-component-colors, java);
background-color: inherit;
border: solid 1px;
}
}
77 changes: 34 additions & 43 deletions assets/scss/_variables_project.scss
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
/* docsy-delta full file override: we're not tracking changes to the docsy file of the same name. */
/* Docsy-delta full file override: we're not tracking changes to the Docsy file of the same name. */

$twitter-blue: #00aced;
$gitter-magenta: #ec1363;
Comment on lines -3 to -4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These two component variables are not used.

$opentelemetry-orange: #f5a800;
$opentelemetry-orange-light: #fff0ce;
$opentelemetry-blue: #4f62ad;
$opentelemetry-blue-light: #cee1ff;
$opentelemetry-purple: #425cc7;
$light-green: #c0f587;
$otel-colors: (
'orange': #f5a800,
'orange-light': #fff0ce,
'blue': #4f62ad,
'blue-light': #cee1ff,
'purple': #425cc7,
'light-green': #c0f587,
);

$primary: $opentelemetry-blue;
$secondary: $opentelemetry-orange;
$td-enable-google-fonts: false;
$google_font_name: 'Noto Sans';
$google_font_family: 'Noto+Sans:300,400,600,700';
Comment on lines -15 to -16
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Redefining $google_font_* has no effect when $td-enable-google-fonts is false


$enable-gradients: false;
$enable-rounded: true;
$enable-shadows: false;
Comment on lines -18 to -20
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropping these, falling back on Docsy defaults.


$registry-vertical-margin: 1rem;
$green: #26c53e;
$dark-blue: #39a9da;
$otel-component-colors: (
'collector': #070002,
'core': #2c3ed3,
'cpp': #f34b7d,
'dotnet': #178600,
'erlang': #b83998,
'exporter': #3ed32c,
'extension': #d3532c,
'go': #00add8,
'instrumentation': #d32c3e,
'java': #b07219,
'js': #f1e05a,
'lua': #03037b,
'php': #4f5d95,
'processor': #d32c42,
'python': #3572a5,
'receiver': #742cd3,
'ruby': #701516,
'rust': #dea584,
'swift': #de5d43,
'utilities': #2cd3b4,
);

$core: #2c3ed3;
$instrumentation: #d32c3e;
$exporter: #3ed32c;
$extension: #d3532c;
$utilities: #2cd3b4;
$receiver: #742cd3;
$processor: #d32c42;

$collector: #070002;
$dotnet: #178600;
$cpp: #f34b7d;
$erlang: #b83998;
$go: #00add8;
$java: #b07219;
$javascript: #f1e05a;
$lua: #03037b;
$php: #4f5d95;
$python: #3572a5;
$ruby: #701516;
$rust: #dea584;
$swift: #de5d43;
$primary: map-get($otel-colors, 'blue');
$secondary: map-get($otel-colors, 'orange');
$td-enable-google-fonts: false;