Class LfStylesService
java.lang.Object
com.atlassian.jira.plugin.navigation.LfStylesService
Service responsible for delivering Look and Feel styles to the front-end (HTML).
- Provides CSS variables that define Look and Feel
- Provides CSS variables that define logo displayed in the header
logo URLs for light and dark theme.
Injected inline styles are responsible for rendered logo that dynamically reloads upon theme change.
- Since:
- 10.2
-
Constructor Summary
ConstructorsConstructorDescriptionLfStylesService
(ApplicationProperties applicationProperties, com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration, LnFDefaultColorProvider lnFDefaultColorProvider, SoyTemplateRendererProvider soyTemplateRendererProvider, LogoProvider logoProvider) -
Method Summary
Modifier and TypeMethodDescriptionPrepare inline styles to inject Look and Feel CSS variables depending on the theme.
-
Constructor Details
-
LfStylesService
public LfStylesService(ApplicationProperties applicationProperties, com.atlassian.plugin.webresource.WebResourceIntegration webResourceIntegration, LnFDefaultColorProvider lnFDefaultColorProvider, SoyTemplateRendererProvider soyTemplateRendererProvider, LogoProvider logoProvider)
-
-
Method Details
-
prepareLookAndFeelColorsCss
Prepare inline styles to inject Look and Feel CSS variables depending on the theme. Injects also CSS variable that control the logo in the App header.- Returns:
- string with CSS selectors
e.g. html:not([data-theme]), html[data-color-mode="dark"][data-theme~="dark:light"], html[data-color-mode="dark"][data-theme~="light:light"], html[data-color-mode="light"][data-theme~="light:original"] { --jira-custom-logo-content: _url_; --jira-color-gadgetcolor1: #0747a6; --jira-color-gadgetcolor2: #de350b;
} html[data-color-mode="dark"] { --jira-custom-logo-content: _url_; --jira-color-gadgetcolor1: var(--ds-background-brand-bold); --jira-color-gadgetcolor2: var(--ds-background-danger-bold);
}
-