Page 1 of 1

Problems with creating a new theme. Best practice?

Posted: 13 Dec 2018, 13:11
by JHahn
Hi.

I've bought PrimeDesigner and was a little bit disillusioned:
  1. Customize the basic theme only with the _variables.scss file leads not too far. The styling posibillities are limited. Individual stylings like different border widths AND different border.colors on one element are not possible with just one variable.
  2. There are inconsistencies, e.g. the variable $inputListItemHighlightBgColor is assigned to the selected element in a dropdown but also to a hovered element in an autocomplete input!
  3. Some elements like the password meter could not be styled because of inline styles that are added to the component in the JS module (password.js)
  4. Hardcoded units in the SASS files e.g. _forms.scss, line 412

    Code: Select all

     $inputListHeaderPaddingRight + .5em;
    lead to compiling errors in the Angular CLI when the variable contains an other unit then "em".
So my question is: Is there a best practice to create a custom theme without changing the designer core *.scss files?

It would be absolutely ok for me if it would be somehow possible to override the PrimeDesigner core files. but I don't want to change stuff in the files because then updates to newer version would be impossible. The idea was to do the basic settings with the variables in _variables.scss and do additional styling by overriding parts of the PrimeDesigner SASS files. Therefore I wanted to copy the selectors from the origin SASS files to my _overrides.scss file and include this as last in my _extensions.scss . But this breaks because of the point 4 (hardcoded units) when I try to use "rem" instead of "em" in _variables.scss.

Thanks in advance for your kind help :-). Cheers, Josef

Re: Problems with creating a new theme. Best practice?

Posted: 19 Dec 2018, 09:23
by JHahn
Doesn't anyone have an idea how to customize the PrimeDesigner files and keep them updateable? :(

Re: Problems with creating a new theme. Best practice?

Posted: 19 Dec 2018, 12:20
by cagatay.civici
Best alternative is to avoid changing the designer/*.scss files since they are the ones that get updated and put your extensions (wiith copy to override) with your own variables in _extensions.scss.

Re: Problems with creating a new theme. Best practice?

Posted: 29 Dec 2018, 12:28
by Lienanzor
cagatay.civici wrote:
19 Dec 2018, 12:20
Best alternative is to avoid changing the designer/*.scss files since they are the ones that get updated and put your extensions (wiith copy to override) with your own variables in _extensions.scss.
Thanks for you advice.