Semantic UI - Change Theme

青春壹個敷衍的年華 提交于 2019-12-20 10:01:35

问题


I can't get the theme selection to work in Semantic UI.

I attempt to follow the instructions provided in the workflow section of the documentation:

Files in the examples/ folder of your project can be useful for testing out changes in your UI. For example, you might run gulp watch download a new theme to src/site/themes/ then adjust your theme.config file with the name of the new theme and refresh examples/kitchensink.html to inspect changes in the theme.

So in the semantic ui directory, after the suitable gulp build / gulp install steps,

  1. I type gulp watch,

  2. I modify src/theme.config, for example:

    ...
    /* Elements */
    @button     : 'material';
    ...
    
  3. The file dist/semantic.css is regenerated (says inotify).

So far so good ... except that the rendering of the examples/kitchensink is still the default one. A closer look at dist/semantic.css shows that it is actually identical to the original one.

Could anyone point out the (probably obvious) issue in my process ?


回答1:


Step 1. Change /src/themes/theme.config to reflect your desired theme (ex. @button: 'material')

Step 2. Rebuild - gulp build

Step 3. Refresh your browser



来源:https://stackoverflow.com/questions/27213694/semantic-ui-change-theme

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!