obsidian-timelines icon indicating copy to clipboard operation
obsidian-timelines copied to clipboard

Misleading CSS class related documentation

Open revolter opened this issue 11 months ago • 2 comments

This page mentions that "ob-timelines must be specified" as the CSS class, but doing so causes an event to be skipped in horizontal timelines, which is the opposite of the documentation stating that "invalid timeline events will be skipped".

revolter avatar Jan 07 '25 16:01 revolter

Hello, I agree there is some messy documentation that I could clear up. Thanks for bringing this up.

The issue here is that there's essentially 2 arguments for classes for a timeline event. We have both class and data-classes

<div
  <!-- this argument here is what the link you gave is talking about -->
  class="ob-timelines" 
  data-title=""
  <!-- this argument is for custom classes -->
  data-classes=""
  data-color=""
  data-type=""
  data-start-date=""
  data-end-date=""
  data-era=""
  data-path=""
  data-tags=""
> some content </div>

link to docs on data-classes: https://seanlowe.github.io/obsidian-timelines/docs/04_arguments/02_html_arguments/#classes-data-classes

seanlowe avatar Jan 17 '25 18:01 seanlowe

Oh, I read the entire documentation thinking it's the same.

We should add a clear notice the first time each of them is mentioned, similar to this:

class (note that this is different from data-classes!)

and

data-classes (note that this is different from class!)

revolter avatar Jan 17 '25 18:01 revolter