discord-qt icon indicating copy to clipboard operation
discord-qt copied to clipboard

Question: where is the scss file imported?

Open yumindev opened this issue 2 years ago • 2 comments

Hi,

Thanks for the awesome project.

So, I am trying to figure out how and where the scss files are imported. For example, the MainView.scss file is not found or imported in the MainView.ts file.

Could you please help me understand it? Thanks

Regards Yumin

yumindev avatar Sep 16 '21 19:09 yumindev

Hello, the SCSS files are not being imported anywhere in the project. Rather, they are all being compiled into one CSS file and set as a stylesheet for an entire window.

Qt Widgets have a property called objectName, which can be used as a class name in regular HTML, CSS. In order for these SCSS files to not interfere with each other, they are developed in such a way that they belong to only one Component, thus they in most cases have only one top-level objectname class defined.

I hope that answers your question.

ruslang02 avatar Sep 17 '21 07:09 ruslang02

Thank you so much! @ruslang02

So, there is a follow up question. "Rather, they are all being compiled into one CSS file and set as a stylesheet for an entire window." Would you please tell me about its specifics ?

I mean, I can have a guess that maybe scss files are compiled by webpack or babel and I do see the config in webpack.config.js file,

but how to "set as a stylesheet for an entire window" ? I couldn't find any config about it. Thanks

yumindev avatar Sep 17 '21 16:09 yumindev