Installations
npm install @sap-ui/common-css
Score
94.8
Supply Chain
77.6
Quality
96.5
Maintenance
100
Vulnerability
100
License
Releases
v0.39.0-rc.32
Published on 28 Nov 2024
v0.39.0-rc.31
Published on 28 Nov 2024
v0.39.0-rc.30
Published on 26 Nov 2024
v0.39.0-rc.29
Published on 26 Nov 2024
v0.39.0-rc.28
Published on 26 Nov 2024
v0.39.0-rc.27
Published on 26 Nov 2024
Developer
Developer Guide
Module System
ESM
Min. Node Version
Typescript Support
No
Node Version
20.17.0
NPM Version
10.8.2
Statistics
188 Stars
6,124 Commits
60 Forks
16 Watching
259 Branches
668 Contributors
Updated on 28 Nov 2024
Languages
HTML (65.47%)
SCSS (20.16%)
JavaScript (13.02%)
TypeScript (1.31%)
Shell (0.03%)
Total Downloads
Cumulative downloads
Total Downloads
343,638
Last day
-11.2%
3,233
Compared to previous day
Last week
5.2%
18,657
Compared to previous week
Last month
6.8%
75,798
Compared to previous month
Last year
6,446.8%
338,468
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Fundamental Library Styles
What is Fundamental Library Styles?
Fundamental Library Styles is a lightweight presentation layer that can be used in conjunction with any UI framework, such as Angular, React, Vue, etc. By utilizing the Fundamental Styles library, which includes a collection of stylesheets and HTML tags, developers can create visually consistent and professional-looking Fiori applications in any web-based technology of their choice.
We are also working on Angular , React and Vue implementations.
Getting Started
The library is modular, so you can use as little or as much as you need.
CDN
The fully compiled, minified library is available via unpkg CDN for inclusion in your application.
For prerelease
version use
1<link href='https://unpkg.com/fundamental-styles@prerelease/dist/fundamental-styles.css' rel='stylesheet'>
For latest
stable version use
1<link href='https://unpkg.com/fundamental-styles@latest/dist/fundamental-styles.css' rel='stylesheet'>
You can also include specific version of library into your html via using
1<link href='https://unpkg.com/fundamental-styles@{versionNumber}/dist/fundamental-styles.css' rel='stylesheet'>
where you should replace {versionNumber}
with desired version number. For example with 0.20.3
Theming
To use particular theme you need to include two CSS variables files:
1<link href='https://unpkg.com/@sap-theming/theming-base-content/content/Base/baseLib/{themeName}/css_variables.css' rel='stylesheet'>
1<link href='https://unpkg.com/fundamental-styles@{versionNumber}/dist/theming/{themeName}.css' rel='stylesheet'>
Available values for themeName
are
sap_horizon
,
sap_horizon_dark
,
sap_horizon_hcb
,
sap_horizon_hcw
,
sap_horizon_set
,
sap_fiori_3
,
sap_fiori_3_dark
,
sap_fiori_3_hcb
,
sap_fiori_3_hcw
,
sap_fiori_3_set
,
sap_fiori_3_light_dark
NPM Package
The compiled CSS for the full library and modules, e.g., core, layout, etc., are distributed via NPM.
npm install fundamental-styles --save
NOTE: We only distribute compiled CSS for each component, not the full project or HTML for specific components.
Icons
See the Icon Component for a list of icon class names. See Project Configuration below for instructions to include SAP Fiori icons in your project.
Project Configuration
This project does not contain fonts and icons - they must be added to your project separately. Download the @sap-theming
library. After adding fonts and icons to your project, include the following in your CSS(The icon font files have different design for Fiori 3 themes and they can be found in the folder @sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/
):
1@font-face { 2 font-family: "72"; 3 src: url("~@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Regular-full.woff") format("woff"); 4 font-weight: normal; 5 font-style: normal; 6} 7 8@font-face { 9 font-family: "72"; 10 src: url("~@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Bold-full.woff") format("woff"); 11 font-weight: 700; 12 font-style: normal; 13} 14 15@font-face { 16 font-family: "72"; 17 src: url("~@sap-theming/theming-base-content/content/Base/baseLib/baseTheme/fonts/72-Light-full.woff") format("woff"); 18 font-weight: 300; 19 font-style: normal; 20} 21 22@font-face { 23 font-family: "SAP-icons"; 24 src: url("~@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon/fonts/SAP-icons.woff") format("woff"); 25 font-weight: normal; 26 font-style: normal; 27} 28 29@font-face { 30 font-family: 'BusinessSuiteInAppSymbols'; 31 src: url('~@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon/fonts/BusinessSuiteInAppSymbols.woff') format('woff'); 32 font-weight: normal; 33 font-style: normal; 34} 35 36@font-face { 37 font-family: 'SAP-icons-TNT'; 38 src: url('~@sap-theming/theming-base-content/content/Base/baseLib/sap_horizon/fonts/SAP-icons-TNT.woff') format('woff'); 39 font-weight: normal; 40 font-style: normal; 41} 42 43html { 44 font-size: 16px; 45}
Working with the Project
Download and Installation
-
Clone Repository Clone the repo using the git software of your choice or using the git command
git clone https://github.com/SAP/fundamental-styles.git
-
Install NPM Dependencies:
npm install
-
Serve the development playground and documentation website locally
- If you want to serve with development environment run
npm start
- For production build serve run
npm run start:prod
- If you want to serve with development environment run
Project Dependencies
The project has the following prerequisites:
- Git (for downloading this repo)
- Node LTS
SLA
Our Service Level Agreement. Fundamental Library Styles is aiming to deliver:
SLA - What
- Consumable CSS that strives for Fiori compliance.
- Reference HTML specification that consuming libraries MUST adhere to.
SLA - How
- Theme-able components built on top of SAP Theming Base Content by consuming the CSS Custom Properties delivered by the theming library
- Self-contained styles. That is, each component's style file contains all the styling needed to be rendered properly.
External styling won't bleed-in internal styling won't bleed-out.
Bleeding in
means that CSS global reset won't affect the component andbleeding out
means that the component styling should not affect other HTML elements) - Accessibility support
- Accessibility - Color contrast support for WCAG 2.0 level AA (4.5:1 for typical text)
- Accessibility - Semantic HTML reference
- Accessibility - Aria attributes noted when possible in HTML reference
This library is also being consumed by Fundamental Library for Angular , Fundamental Library for React, and Fundamental Library for Vue.
The above SLA is the primary difference between this library and the earlier Fundamental.
Support
If you encounter an issue, you can create a ticket or post on the Fundamentals Slack channel .
Contributing
If you want to contribute, please check the SAP Contribution Guidelines, the Contribution Guidelines. Also check the Development Guidelines and Visual Testing Guide.
Versioning
The fundamental-styles
library follows Semantic Versioning. These components strictly adhere to
the [MAJOR].[MINOR].[PATCH]
numbering system (also known as [BREAKING].[FEATURE].[FIX]
).
Merges to the main
branch will be published as a prerelease. Pre-releases will include an rc version (_
e.g._ [MAJOR].[MINOR].[PATCH]-rc.[RC]
).
The following circumstances will be considered a MAJOR or BREAKING change:
- Dropping existing classnames, CSS variables, color names, color groups, spacing parameters
- The existing underlying HTML markup of a component is altered
- Non-visual HTML attribute changes/additions (such as
role
,aria-*
,data-*
)Note: Fundamental Styles provides CSS directly, and HTML as reference to consumers. Because of the reference relationship of the HTML seen in Fundamental Styles, we want to be very clear when we alter that reference so that it is properly reflected in JS implementation libraries. Because of this, even non-visual changes will be treated as breaking.
The following circumstances will NOT be considered a MAJOR or BREAKING change:
- Introducing new classnames, CSS variables, color names, color groups, spacing parameters
- Adding or modifying CSS properties and values of existing classnames.
Fundamental Library GitHub Repository
The Fundamental Library GitHub Repository is a monorepo package that allows the reusage of other packages while keeping them isolated from one another. The Fundamental Library GitHub Repository consist of:
Customer Experience Package Fundamental Library Next Package Common Css Styles Package
Thanks
Thanks to Chromatic for providing the visual testing platform that helps us review UI changes and catch visual regressions.
No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/SAP/.github/SECURITY.md:1
- Info: Found linked content: github.com/SAP/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/SAP/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/SAP/.github/SECURITY.md:1
Reason
no binaries found in the repo
Reason
5 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-8hc4-vh64-cxmj
- Warn: Project is vulnerable to: GHSA-4wx3-54gh-9fr9
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
Reason
Found 11/28 approved changesets -- score normalized to 3
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/chromatic.yml:1
- Warn: no topLevel permission defined: .github/workflows/create-release.yml:1
- Warn: no topLevel permission defined: .github/workflows/on-pull.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 14 are checked with a SAST tool
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/chromatic.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/chromatic.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/chromatic.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/chromatic.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create-release.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/create-release.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/create-release.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/create-release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/create-release.yml:110: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/create-release.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/create-release.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/create-release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/on-pull.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/on-pull.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/on-pull.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/on-pull.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/on-pull.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/on-pull.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/on-pull.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/SAP/fundamental-styles/on-pull.yml/main?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 4 third-party GitHubAction dependencies pinned
Score
5.3
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More