Skip to content
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

Adjusting CSS #2

Open
eb2ai opened this issue Dec 21, 2023 · 9 comments
Open

Adjusting CSS #2

eb2ai opened this issue Dec 21, 2023 · 9 comments
Labels
feature request New feature or request

Comments

@eb2ai
Copy link

eb2ai commented Dec 21, 2023

I think it would be fantastic to be able to adjust some CSS.

image

For example

  • max-width of the overall graph
  • lines between cells
  • font size

This could be done as a plugin setting or using the "Style Settings" plugin that many others take advantage of.

@zincplusplus
Copy link
Owner

I'll check that plugin out. I will see if Habit Tracker 21 can be compatible with that, but in general I want it to be as standalone as possible. If you look at a lot of plugins, especially in this space, they depend on stuff like dataview. I think for the user that's not so intuitive, and I want to keep the barrier of entry as low as possible.

@zincplusplus
Copy link
Owner

Can you be more specific on why you want to have controls over those properties? What would you do once this functionality is available?

@eb2ai
Copy link
Author

eb2ai commented Dec 24, 2023

Simple aesthetics. It can certainly be done via css snippets, but I feel this just makes it easier for folks.

@zincplusplus
Copy link
Owner

I'm genuinely curios what you'd change about the aesthetics. You're telling me what the solution is, what I'm curios is what is your need/problem that requires to change the CSS/looks that way I can ship more robust solutions.

@zincplusplus zincplusplus added the feature request New feature or request label Dec 28, 2023
@holroy
Copy link
Contributor

holroy commented Feb 9, 2024

I just found your plugin, and to me the font size was just too small, and I didn't like that the habit names didn't follow the normal rules for a link, so I added this CSS almost immediately:

.habit-tracker__row > .habit-tracker__cell:first-child {
    font-family: inherit;
    font-size: inherit;
}
.habit-tracker__cell {
    font-size: 13px;
}

The nice thing if you adapt to the Style settings plugin is that your plugin will be as standalone as it was before, but the CSS changes a little allowing it to be changed by that plugin if you've chosen to install it.

It's just an easy way to allow for people like myself or the OP to change certain settings related to the visual display of your plugin.

@holroy
Copy link
Contributor

holroy commented Feb 9, 2024

Here are some ideas for what could be changed through such settings:

  • font, size and color for the date row at the top
  • font, size and color for the habit column to the left
  • various width and size settings for the entire graph
  • line style?
  • color of the habit line

(And me just rambling: Would it be nice to have a set of colors, so that the rows cycle through a given set of colors? Aka the first row has one color, the second row another color, and so on... And then after a given number it restarts the color cycle? )

holroy added a commit to holroy/habit-tracker that referenced this issue Feb 12, 2024
Here is a starter set for setting colors through the Style Settings plugin. Even if that plugin is not present, the variables have a default value which then will be used.
@bjornfiles
Copy link

I'm genuinely curios what you'd change about the aesthetics. You're telling me what the solution is, what I'm curios is what is your need/problem that requires to change the CSS/looks that way I can ship more robust solutions.

I think the need is related to part of the core value proposition of Obsidian… that it's is a very personal space that one can easily make to look and feel almost exactly how they want.

@zincplusplus
Copy link
Owner

Will pick this up soon. Thanks for the feedback 🙏

@holroy
Copy link
Contributor

holroy commented Apr 12, 2024

I think the linked PR will allow for most of your changes, and still respect the default settings of the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants