- Notifications
You must be signed in to change notification settings - Fork59
SAP Design System component library for building SAP user interfaces with any web technology.
License
SAP/fundamental-styles
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 onAngular,React andVue implementations.
The library is modular, so you can use as little or as much as you need.
The fully compiled, minified library is available viaunpkg CDN for inclusion in your application.
Forprerelease
version use
<linkhref='https://unpkg.com/fundamental-styles@prerelease/dist/fundamental-styles.css'rel='stylesheet'>
Forlatest
stable version use
<linkhref='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
<linkhref='https://unpkg.com/fundamental-styles@{versionNumber}/dist/fundamental-styles.css'rel='stylesheet'>
where you should replace{versionNumber}
with desired version number. For example with0.20.3
To use particular theme you need to include two CSS variables files:
<linkhref='https://unpkg.com/@sap-theming/theming-base-content/content/Base/baseLib/{themeName}/css_variables.css'rel='stylesheet'>
<linkhref='https://unpkg.com/fundamental-styles@{versionNumber}/dist/theming/{themeName}.css'rel='stylesheet'>
Available values forthemeName
aresap_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
The compiled CSS for the full library and modules, e.g., core, layout, etc., are distributedviaNPM.
npm install fundamental-styles --save
NOTE: We only distribute compiled CSS for each component, not the full project or HTML for specific components.
See theIcon Component for alist of icon class names. See Project Configuration below for instructions to include SAP Fiori icons in your project.
This project does not contain fonts and icons - they must be added to your project separately. Download the @sap-theming/theming-base-content 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/
) as opposed to Horizon where the icons are stored in the subfolder fonts@sap-theming/theming-base-content/content/Base/sap_horizon/baseTheme/fonts/
. It would require to include everything from@sap-theming/theming-base-content/content/Base/baseLib/
.
font-size: 16px;}
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
The project has the following prerequisites:
- Git (for downloading this repo)
- Node LTS
Our Service Level Agreement. Fundamental Library Styles is aiming to deliver:
- Consumable CSS that strives forFiori compliance.
- Reference HTML specification that consuming librariesMUST adhere to.
- Theme-able components built on top ofSAP Theming Base Content byconsuming 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'taffect 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 byFundamental Library for Angular,Fundamental Library for React,andFundamental Library for Vue.
The above SLA is the primary difference between this library and theearlierFundamental.
If you encounter an issue, you can create aticket orpost ontheFundamentals Slack channel.
If you want to contribute, please checktheSAP Contribution Guidelines,theContribution Guidelines. Also checktheDevelopment GuidelinesandVisual Testing Guide.
Thefundamental-styles
library followsSemantic Versioning. These components strictly adhere tothe[MAJOR].[MINOR].[PATCH]
numbering system (also known as[BREAKING].[FEATURE].[FIX]
).
Merges to themain
branch will be published as a prerelease. Pre-releases will include anrc 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.
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 PackageFundamental Library Next PackageCommon CssStyles Package
Thanks toChromatic for providing the visual testing platform that helps us review UIchanges and catch visual regressions.
About
SAP Design System component library for building SAP user interfaces with any web technology.
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.