Skip to content

Placement of styles in a file #2370

Answered by yulolimum
susonthapa asked this question in Q&A
Discussion options

You must be logged in to vote

@susonthapa great question!

There's really no rule for style placements - I think that's more of a personal preference. In Ignite, we elected the default placement to be at the bottom of the file - it doesn't make it better or worse - just a recommended placement. In previous versions of Ignite, we had them above the component class/function.

In my personal experience, I find that having the styles above the component isn't ideal for my personal workflow/efficiency as scrolling from the top of the file to the component definition would differ from file to file depending on the amount of styles declared. With them being at the bottom, you instinctively know where to scroll to to find the c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yulolimum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants