-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add inline style instead of increasing css size
- Loading branch information
1 parent
2a49c55
commit 9afa3f4
Showing
3 changed files
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9afa3f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this is a good enough reason @abaicus right? it kinds of defeat the purpose of that limit for me.
9afa3f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ineagu what reason are you thinking about? he just reverted the limit to the previous value?
9afa3f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that finding ways to add more css inline to not going over the limit isn't a good reason, since is still css and inline is not always the best idea, which is what I got from the commit title " add inline style instead of increasing css size"
If this is the best solution that's fine.
9afa3f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the style is loaded conditionally when lightbox is used inside the image tag, if this is a general enough use case we can add to the main style too.
9afa3f4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding it conditionally make sense, my thought was that the reason for doing this should be that is the better option, not because we don't want to increase the limit.
As I understand this condition that was added, is executed at every page request in order to decide if those 4 lines of css are needed, which I am not sure if is more or less optimal on un-cached pages. This type of non-critical css that require interactions to be useful, I would assume it can be added in a file, loaded in the footer.
But I don't have enough understanding on this aspect, the reason that trigged my comment was the commit title and the reason.