๐ŸŽ„ Advent Calendar: Every day a new Custom CSS Snippet

(I know Iโ€™m a week late :stuck_out_tongue_winking_eye:)

Custom CSS Advent Calendar

Iโ€™ll clean up and release a CSS Snippet each day until Christmas.
We got columns, tables, dividers and much more.

Day 26: ๐ŸŽจ Link Tooltip

Link to the :scroll:
image
Useful in the Desktop app since you donโ€™t have the bottom left link preview.
Thanks again to Martin for extending the markup pretty quickly to make this possible. :blue_heart:


I had not enough time to prepare the missing days here.


Day 19: ๐ŸŽจ Print Helper

Link to the :scroll:
thumb

Day 18: ๐ŸŽจ Active Recall Learning

Link to the :scroll:

thumb

Basically an extension of Hiding Clozes for Practice (Youtube)
Check the README on the Homepage for usage instructions if you get stuck.

Day 17: ๐ŸŽจ Pros and Cons List

Link to the :scroll:

Day 16: ๐ŸŽจ Super Zen Mode

This one is not meant 100% seriously, but there are some nice methods to make the current position
in the hierarchy more prominent: https://twitter.com/CatoMinor3/status/1338072468507029509

Link to the :scroll:
thumb

Day 15: ๐ŸŽจ Numbered List

Not a 100% serious one, but itโ€™s interesting what CSS can do.
Link to the :scroll:
thumb

Day 14: ๐ŸŽจ Bigger \LaTeX

Link to the :scroll:
image

Day 13: ๐ŸŽจ tskn's Theme

One of the best themes for RemNote, designed by tskn, coded by Eva (evathomasv/RemNoteTheme), ported from Stylus to Custom CSS to be usable in the new Desktop app. I also fixed some search box issues.
Link to the :scroll:

Day 12: ๐ŸŽจ Codeblock Line Numbers

Happy Hanukkah, too :slight_smile:
Link to the :scroll:
image

Day 11: ๐ŸŽจ Blockquote

Link to the :scroll:
thumb

Day 10: ๐ŸŽจ Divider

Link to the :scroll:
image
Note: This snippet has configuration options at the start (--divider-style: thinkness line-style color). Try changing it to your likeing. You can use anything from here: https://developer.mozilla.org/en-US/docs/Web/CSS/border
E.g. try this

--divider-style: 4mm ridge rgba(170, 50, 220, .6);
Day 9: ๐ŸŽจ Sidebar Icons

Link to the :scroll:
thumb

Day 8: ๐ŸŽจ Column Layout

Link to the :scroll:

Day 7: ๐ŸŽจ Kanban Board

Link to the :scroll:

Day 6: ๐ŸŽจ Pills list

Link to the :scroll:
preview

19 Likes

Nice!

I wish it was possible to have some tags be toggleable (allowing to disable/enable them, while still keeping them there). That would be useful when using tags for styling, such as in the kanban example.

That can be done :smiley:: Have another tag #disable styling and only style when it is not present.

But I guess you mean to change the markup directly. IDK if this is feasable with a user script or would have to be builtin.

1 Like

Yeah, that would work! But I was thinking a more intuitive interface (like the checkbox they have for making code blocks active/inactive)

The day Iโ€™m waiting for. Thanks for all the awesome stuff you put out hannes!

1 Like

Colum layout is great!

Question: should/can you make it so it also works when viewing the Rem itself?
In the example below, if I click to expand โ€œTesting columnsโ€ or โ€œCan I nest?โ€, those Rems arenโ€™t displayed in columns.
(I donโ€™t really need this specificallyโ€ฆ unless itโ€™s a quick fix)

1 Like

Yes I can. Good suggestion. Thatโ€™s what the data-document-tags are for :slight_smile: [Edit: Iโ€™ll add this function probably to another, more powerful scroll for another day and keep the column layout as a lightweight style for non-document rems.]

In general it would be nice to report suggestions on the scroll homepage issue tracker (usually the library itself). Iโ€™ll add a button to remnote for that soon I think. Or else some things will vanish in the depths of this forum.

1 Like

I was thinking about this. It would actually be cool to have certain tags behave differently when interacted with.

Some possible types:

  • Toggle: tags that when clicked cycle between two states (Active/Inactive, for example)
  • Dropdown: tags that when clicked show a dropdown with options of other states to choose
  • Area: tags that allow changing state by clicking on certain parts of it (ex: โ€œ:star::star::star::star::star:โ€ could be changed to 4stars just by clicking on the area where the 4th star is)

By โ€œstateโ€ above I just mean another tag. Essentially these would just be a fancy way of removing a tag and adding another. (Somewhere weโ€™d need to define which tags are related, and how)

On the other hand, maybe this is a messy way to deal with this.
Maybe it makes more sense to do this within some metadata fields for each Rem.
(If that makes sense)

1 Like

Thatโ€™s some nice use cases. I donโ€™t think this is possible with pure CSS though. We might need a plugin/user script (Javascript in general) for this.

2 Likes

I like the divider. Thanks! Very useful.

(I guess it would be best for it to continue showing as a divider even on hover, requiring a click to edit. But thatโ€™s a minor thingโ€ฆ)

1 Like

I thought about that but decided it would also be useful to remove the divider tag with just one instead of two clicks. Buz maybe you remove the whole rem anyway. Itโ€™s just a minor edit. Feel free to make a Pull Request on Github :stuck_out_tongue:

That sounds like sci-fi talk to me. haha

Just kidding. I know what it is.
Actually it would be cool to try to contribute at least some. Id probably learn a lot from it.
But itโ€™s hard to find the timeโ€ฆ (Iโ€™m barely managing to work on my knowledge base in the first placeโ€ฆ)

Is there a simple way to disable all Custom CSS?

Ideally, Iโ€™d like this to override existing enabled/disabled status of individual code blocks.

That way I can disable everything temporarily when needed, then revert back to how it was before without losing my previous selections.


It would be nice if the numbered list worked with children but still very nice, thank you

Trying out the numbered list. Very nice!

I changed it a bit to have it show only the number (but keep the bullet invisible on top, to allow bullet operations).

Hereโ€™s the resulting code with (minor) changes. Beware! As always with my โ€œcodeโ€, this is probably not the best way to do this.

.tree-node-container[data-rem-container-tags~="numbered-list"]
  > .TreeNode
  > .tree-node-container {
  counter-increment: remNumber;
}

.tree-node-container[data-rem-container-tags~="numbered-list"]
  > .TreeNode
  > .tree-node-container
    > div:first-child
  .rem-bullet__container:before {
  content: counters(remNumber, ".") " ";
  position: absolute;
  right: 8px;
}

.tree-node-container[data-rem-container-tags~="numbered-list"]
.tree-node-container[data-rem-container-tags~="numbered-list"]
  > .TreeNode
  > .tree-node-container {
  counter-increment: remNumber;
}

.tree-node-container[data-rem-container-tags~="numbered-list"]
  > .TreeNode
  > .tree-node-container
    > div:first-child
 .rem-bullet {
visibility: hidden;
}
3 Likes

What a wonderful holiday treat. :partying_face:

Thank you!

2 Likes

Sorry, for the delay guys. I got distracted a bit (:gear: Smart Rem).

The calendar continues tomorrow, or the day after. One click/copy&paste install should work then since we got [Custom CSS] Toggle codeblocks in a subtree now :heart:. I have still about a dozen CSS snippets in the pipeline.

3 Likes

Marry Christmas to everybody!!! :santa:
Thank you Hannes for this wonderful advent calendar and for making Christmas even more cheerful to everybody! :slight_smile:

1 Like

What a great present! Thank you very much!
Could you please explain how to use the Column Layout? What shortcut do I need to create a new column and what shortcut to switch between them?
Tahank you!

Thus far, all snippets manipulate only the way the data is presented, not the data itself.
In that spirit, hereโ€™s an example step by step.


Then just add the tag ##columns (Iโ€™ve renamed mine to _columns so as to not confuse the search) to the rem where the table is named and here is the result

Keep in mind this interaction as well.


Basically, you can add an empty line after the name to have it preserve the columns when zooming into the title.