-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce the use of !important
for GitHub banner
#744
Conversation
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.
Non-relevant to GitHub banner.
@ivan-nginx The title of this PR is called |
} | ||
+tablet-mobile() { | ||
> svg { | ||
if (scheme == 'Pisces') || (scheme == 'Gemini') { | ||
fill: #fff !important; |
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.
Here. Please, have a look.
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.
U say u fix hide()
with !important
. GitHub banner nothing to do with this.
Also, u brake foreground styles for GitHub banner.
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.
My mistake, it's not just about hide()
And I have tested, it's fine in all resolution, doesn't brake foreground styles
I believe this PR is ready to be merged now. No other work needs to be done |
@@ -76,8 +76,7 @@ use_seo = hexo-config('seo'); | |||
} | |||
|
|||
// Post delimiters. | |||
.post-eof, | |||
.post-spread { |
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.
Are we remove this class? I don't remember...
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 didn't find post-spread
in NexT... seems it has been removed
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.
Here: https://github.com/theme-next/hexo-theme-next/pull/357/files. .post-spread
no longer exist
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.
All refactoring like this must be tested carefully. Screens with each scheme & resolution also needed and welcome.
@@ -34,8 +43,7 @@ | |||
+mobile() { | |||
> svg { | |||
if (scheme == 'Mist') { | |||
top: inherit !important; | |||
margin-top: -50px; |
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.
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.
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.
Oh, my fault: i forgot to checkout your pull.
@@ -10,7 +9,7 @@ | |||
} | |||
|
|||
.post:last-child { | |||
.post-eof.post-eof.post-eof { |
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.
Screen? Where is this class?
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.
Not sure. But it's same as .post-eof
, no need to repeat 3 times
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.
This thing need to add delimeter between posts in homepage. And of course, last delimeter no needed, that's why display none
on last child:
hexo-theme-next/layout/_macro/post.swig
Lines 449 to 452 in 022b9cc
{% set isLast = loop.index % page.per_page === 0 %} | |
{% if is_index and not isLast %} | |
<div class="post-eof"></div> | |
{% endif %} |
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.
But see, in Gemini I make same feature with another way:
hexo-theme-next/source/css/_schemes/Gemini/index.styl
Lines 45 to 53 in 022b9cc
// When blocks are siblings (homepage). | |
#posts > article + article { | |
.post-block { | |
margin-top: $sidebar-offset; | |
// Rewrite shadows & borders because all blocks have offsets. | |
box-shadow: $box-shadow; | |
border-radius: $border-radius; | |
} | |
} |
IDK which method is better, but I think need to choose only one.
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.
So, in Muse and Pisces – .post-eof
enabled.
In Mist – disabled and in Gemini – disabled & implemented with another way.
Need to do refactor for that and join 2 spitted functions into better one.
!important
!important
for GitHub banner
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.
source/css/_schemes/Mist/_posts-expanded.styl (11)
Sorry @stevenjoezhang I made test again for WIP, there's a pending status of WIP, add PR template need to update 😉 |
Anything else need to do with this PR? |
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.
It seems all fine.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue resolved: N/A
What is the new behavior?
How to use?
In NexT
_config.yml
:Does this PR introduce a breaking change?
@wip ready for review