Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@sap-theming/theming-base-content
Advanced tools
This repository provides color, font and metric definitions of SAP themes to be used by application UIs and UI frameworks.
The SAP Theming Base Content contains all necessary data to connect to the SAP global theming infrastructure. The content exposes the central set of colors, metrics and resources of a theme which can be connected by HTML based UI frameworks to get the right values for their specific CSS. The consumption is done by the usage of parameter sets exposed in files of the Base Content. When a HTML based UI framework uses the exposed parameters, it also benefits from the fact that it is integrated in the branding tool of SAP, the UI Theme Designer, allowing a customer to create his own custom theme based on SAP themes.
This repository contains all the source files and generated files a framework needs to connect to the theming infrastructure.
There is no installation needed to consume the files.
You can clone the repository or get wanted the ZIP/TAR from the release section of this repository.
You can also consume the SAP theming Base Content
via npm:
npm install @sap-theming/theming-base-content
The SAP Theming Base Content is structured in the “content” of the project folder The Base Framework content is backward compatible. Therefore, the latest released version can be used for all older versions.
The SAP Theming Base Content contains
The CSS parameters are exposed by a file css_variables.css
in each theme folder
e.g. Base/baseLib/sap_fiori_3/css_varables.css
After you have downloaded this file, you can use the calculated CSS parameter values.
CSS parameters which refer to an URL (e.g. sapCompanyLogo
) are handled a bit different. The CSS variables are applied as a simple string token replacement in the browser. Therefore, there is no URL resolution based on the location of the parameter definition. As a workaround, we introduced a CSS class for each resource CSS parameter that can be used by the consuming HTML.
...
.background-image--sapCompanyLogo {
background-image: var(--sapCompanyLogo);
}
...
The class selector contains the declaration type of the class property and the name of the CSS parameter.
The custom fonts which have to be used for the specific theme are not declared by a font-face at-rule. There are CSS parameters pointing to the locations.
:root {
...
--sapFontUrl_72_Regular_woff2: url('../../../Base/baseLib/baseTheme/fonts/72-Regular.woff2');
--sapFontUrl_72_Regular_woff: url('../../../Base/baseLib/baseTheme/fonts/72-Regular.woff');
--sapFontUrl_72_...
}
Unfortunately, these parameters cannot be used to define a font-face declaration. It seems that the font-face is not part of the “:root” scope. Therefore, it is necessary to define the font declaration you need in your own CSS.
Samples how to refer the parameters and integrate in theming infrastructure are documented in the module @sap-theming/theming-examples-less
(not yet available).
You can require
the theming-base-content module to get the location of the resources.
'use strict';
const express = require("express");
const app = express();
const baseContentResourcePath = require('@sap-theming/theming-base-content').resourcePath;
app.use(express.static(baseContentResourcePath));
app.listen(3000, () => console.log('Try http://localhost:3000/Base/baseLib/baseTheme/fonts/72-Regular.woff2'));
This repository is containing the SAP Open Source Theming Content releases build internally. It is a channel for external distribution. This repository is not open for external contributions.
FAQs
Theming Base Content
We found that @sap-theming/theming-base-content demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.