-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Better style for challenges (+ allow inline placement) #11
Conversation
@fmichonneau has been working on our CSS - François, thoughts?
|
FWIW 👍 I like the proposed new style. |
Thanks, @jduckles! I forgot to mention pros and cons of this solution. Pros:
Cons:
> ## **Challenge:** Query Style {.challenge}
>
> Many people format queries as:
>
> ~~~
> SELECT personal, family FROM person;
> ~~~
>
> or as:
>
> ~~~
> select Personal, Family from PERSON;
> ~~~
>
> What style do you find easiest to read, and why? Of course last point is invalid if we don't want to highlight that this specific box is a challenge. However, in my opinion we should include |
-1 to including the word "Challenge" - the formatting should make it
clear what is and isn't part of a challenge.
|
@pbanaszkiewicz I agree the new style looks better :) |
Thanks, @orchid00! @gvwilson: not sure if I understand correctly. Are you saying that:
|
I think we should insert the word `Challenge` during the
Markdown-to-HTML conversion process. That saves typing (and possible
inconsistency) in the Markdown, and avoids cleverness in the CSS.
|
@gvwilson OK, in that case I think this PR is ready to be merged in (unless we're waiting for @fmichonneau's thoughts). I'll propose an additional filter, but it'll go to https://github.com/swcarpentry/lesson-template, not here. |
@fmichonneau any thoughts on this one? |
The CSS affected by this PR doesn't conflict with what I am working on so I As I was getting more familiar with Bootstrap, I had initially thought we |
I'm -1 to have the word "Challenge" in the HTML. I'm +1 for use CSS, |
OK, how about a small icon inserted into the text instead of the word
"Challenge"? And is element::before robust across a wide range of browsers?
|
If we use an icon, we should probably get one from bootstrap: Browser compatibility for ::before seems pretty good: |
OK - I'll defer to whatever you and Raniere agree on.
|
@r-gaia-cs: what do you prefer me to do:
|
👍 I like the glyphicon-pencil from Bootstrap. @pbanaszkiewicz Can you change |
Yes, sir! This PR will remove styles for ".challenge" and other classes, instead of providing styles for boxes. |
This makes some things look nicer (e.g. adds gradients, etc).
There's a note in swcarpentry/DEPRECATED-lesson-template#182 explaining why we need to fix style for panel heading.
I used force to rewrite this PR (sorry). @r-gaia-cs now it's in your hands (together with swcarpentry/DEPRECATED-lesson-template#182). Please review and merge. |
@pbanaszkiewicz Sorry for the delay. I follow
and (1) I couldn't read "Lessons Objectives" and (2) I couldn't see the icon of "Callout box". Can you help me with it? |
Hi @r-gaia-cs! Regarding (2): icon fonts won't work until you merge #12, and I rebase against it. Regarding (1): I'm not sure what's happening here… at first I'd say something is making box's title header have white background. I'm pretty sure I did not introduce such styles. I'm running into issues with
Can you put your branch as it is somewhere so that we can take a look at the styles and what they are doing? |
Regarding (2): icon fonts won't work until you merge #12, and I rebase against it.
OK.
Regarding (1): I'm not sure what's happening here… at first I'd say something is making box's title header have white background. I'm pretty sure I did not introduce such styles.
I'm running into issues with `git subtree pull -P css/ style fix-challenges -m 'Merge new style'`:
```
From github.com:pbanaszkiewicz/styles
* branch fix-challenges -> FETCH_HEAD
fatal: entry not found in tree ddb226a6b45bec8af629b537f6f292e32821ac84
```
Can you put your branch as it is somewhere so that we can take a look at the styles and what they are doing?
I need to go out now. Will do it when I get home.
|
@pbanaszkiewicz Sorry for the long delay. You can find the bug at https://github.com/r-gaia-cs/swc-lesson-template/tree/bug-with-challenge-style. The problem is that
when it should be
like
|
@pbanaszkiewicz The problem is
and
from
so the color isn't And could you rebase this pull request and swcarpentry/DEPRECATED-lesson-template#182? |
Blockquotes that have a header (with class "callout", "challenge", "prereq", "objectives") as their first element will get rendered as <div>s. Their structure will resemble Bootstrap's panel: http://getbootstrap.com/components/#panels-alternatives There's currently an issue with pandoc: the header nested under the blockquote will never have assigned attributes. This is causing the panel's heading to look enormous. I'll fix it in carpentries/styles#11. BTW: glyphicons won't render correctly unless 'fonts' directory gets moved up one level to the 'css' directory. I'll fix that in carpentries/styles#11 too.
I'm closing this in favor of #17. |
Fix a typo in README.md
This PR changes style for challenges.
Following discussion (#9) about challenges, this should enable us to put them inside a lesson (not at the lesson's end, as it was before).
Additional styling was added that resembles "a box with header-title" (see below).
BEFORE:
AFTER: