-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bring in new menu, changing build step #14
Conversation
…tructure a bit to encourage that technique over global css
@@ -8,6 +8,7 @@ client/data | |||
|
|||
public/*-bundle.js* | |||
public/style.css* | |||
public/components.css* |
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.
maybe there should just be a public/*.css
rule?
client/lib/Navbar.html
Outdated
<div class="anythingelsebutton" on:click="set({visible: false})"></div> | ||
{{/if}} | ||
|
||
<div class="slide-out {{visible}}Visible"> |
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'd strongly recommend using data attributes instead of dynamic classes to represent state:
<div data-visible="{{visible}}" class="slide-out">
Then you can use the selectors [data-visible=true]
and [data-visible=false]
.
rollup.config.js
Outdated
|
||
preprocess: { | ||
style({ content }) { | ||
return new Promise(fulfill => { |
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.
Looks legit to me. One possible change I see: since process()
returns a thenable, you can resolve it directly with Promise.resolve
instead of constructing your own Promise.
The main advantage there is that all errors/responses are represented in the new Promise, whereas right now this promise is only getting resolved if execution makes it all the way down to line 40 without any errors happening.
style({ content }) {
return Promise.resolve(postcss([
require(`precss`)({
import: {
path: [ `client/global-css` ],
prefix: ``,
},
}),
require(`autoprefixer`),
])
.process(content)
.then(result => {
return { code: result }
}))
},
…d of hamfisted css class
I mostly want to know what you think about the rollup changes. I should have made a PR with just them separately. Bah.