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

Use Fiori Fundamentals Styles in ui5 controls #690

Closed
andresfelipe66 opened this issue Jul 25, 2019 · 2 comments
Closed

Use Fiori Fundamentals Styles in ui5 controls #690

andresfelipe66 opened this issue Jul 25, 2019 · 2 comments
Assignees

Comments

@andresfelipe66
Copy link

Describe the documentation issue

  • [X ] Other

Description of the issue

I like to use Fiori Fundamentals CSS (https://sap.github.io/fundamental/components/form.html) in componentes ui5. ¿Is it possible? In this moment I have a project in angular with the next table, in the ui5-input I assign styles from Fiori Fundamentals, in this case I like to have inputs smallers.

image

With a fd-table from Fiori Fundamentals or in a input from html it works fine

image

@fifoosid fifoosid self-assigned this Jul 26, 2019
@fifoosid
Copy link
Contributor

Hello @andresfelipe66

As far as I can see you are trying to show UI5 Components in Compact Content Density.(Please correct me if I am wrong).

In order to achieve this, UI5 Web Components come with built in configuration for different Content Density(Cozy and Compact). Both Cozy and Compact are Fiori 3 compliant. In Cozy Content Density(default one) all controls appear in their original size, whereas in Compact Content Density they appear smaller(compact).

In order to make all your controls appear in Compact(smaller) you can add this config to your index.html:

<script data-id="sap-ui-config" type="application/json">
    {
      "compactSize": true
    }
  </script>

or add the following parameter to your url:

www.someurl.com/app?sap-ui-compactSize=true

I am wondering if this option works for your case.

Otherwise if you need a custom size of the input, with this change #658 which is already in master and will be available in the next release, we make possible to set custom size to ui5-input like this:

ui5-input {
    width: 5rem;
    height: 3rem;
}

UI5 Web Components come with their own CSS and cannot be used with fundamental UI styles.

Best Regards,
Filip

@andresfelipe66
Copy link
Author

Hello @fifoosid

Thanks for the answer, yes is a good idea to use CompactSize=true. It's that I need.

Best Regards,

Andres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants