ruslang02 / discord-qt

Discord client powered by Node.JS and Qt Widgets.
GNU General Public License v3.0
208 stars 11 forks source link

Question: where is the scss file imported? #52

Open yumindev opened 3 years ago

yumindev commented 3 years ago

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

ruslang02 commented 3 years ago

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.

yumindev commented 3 years ago

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