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

In Obsidian 1.5.3 + Minimal Theme 7.4.3, there is a misalignment issue with the positioning of tables. #679

Open
alexinea opened this issue Dec 26, 2023 · 15 comments
Labels
bug Something isn't working

Comments

@alexinea
Copy link

alexinea commented Dec 26, 2023

Is the bug present when using the default Obsidian theme?

Yes

Is the bug present when snippets and plugins are disabled?

Yes

Minimal theme version

7.4.3

Describe the bug

In Obsidian 1.5.3 + Minimal Theme 7.4.3 + Minimal Theme Setting 7.3.1, there is a misalignment issue with the positioning of tables.

I have submitted this issue under the Minimal Theme Settings project. I cannot be certain whether this is an issue with Minimal Theme or Minimal Theme Settings, so I have submitted it for both.

The detailed description of the issue is as follows:
kepano/obsidian-minimal-settings#73


I have already disabled all my CSS Snippets.

This is my Minimal Theme style settings (about Table) in "Style Settings" plugin:

42adbfd19cacc65ebcffd13e7df14ad

I chose "always fill."

Then, the table will display like this:

361bf826ef73068fd6a648bde6cd876

After testing, I discovered that this issue does not occur in the default theme or other themes. If I select the "Fit to line width" option (default value), the table displays correctly (indicating that, by default, tables in the Minimal Theme do not experience misalignment). However, when I select the "Overflow line width" or "Always fill" options, the table's positioning becomes misaligned.

image

Additionally, using cssclasses does not resolve this misalignment issue.

Debug info

SYSTEM INFO:
	Obsidian version: v1.5.3
	Installer version: v1.4.16
	Operating system: Windows 10 Pro 10.0.26016
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Base theme: dark
	Community theme: Minimal v7.4.3
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 9
	Plugins enabled: 9
		1: Thino v2.1.4
		2: Admonition v10.1.1
		3: Advanced URI v1.38.1
		4: Dataview v0.5.64
		5: Hider v1.3.1
		6: Minimal Theme Settings v7.3.1
		7: Obsidian42 - BRAT v0.12
		8: Style Settings v1.0.7
		9: Sortable v0.3.1

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


When I took the screenshot, I had multiple plugins enabled, and I needed to eliminate the interference of the plugins, so I closed all but nine of them, but the problem persisted. Therefore, some of the plugins that appear in my screenshot are not included in the list of plugins in the debug info because I had already disabled them.

@alexinea alexinea added the bug Something isn't working label Dec 26, 2023
@unix2dos
Copy link

tables cannot be dragged and dropped

@alexinea
Copy link
Author

alexinea commented Dec 26, 2023

Addition: The tables generated by DataView do not experience positional displacement.


It is presumed that the problem lies in this sentence.

image

@Sinled
Copy link

Sinled commented Dec 27, 2023

Also have this problem

@alexinea
Copy link
Author

I found that this issue doesn't seem to be fixed in Minimal Theme version 7.4.5.

But still, thanks to @kepano for trying to work around this bug.

@Sinled
Copy link

Sinled commented Jan 7, 2024

Any chances for this to be fixed?

@kepano
Copy link
Owner

kepano commented Jan 7, 2024

There have been some improvements in 7.4.5. For now I would recommend using a different setting in Maximize table width — a full fix will take more time.

@kepano
Copy link
Owner

kepano commented Jan 7, 2024

@Sinled can you share a screenshot of the issue you are seeing. Make sure you are using Minimal 7.4.7+ and let me know which table settings you are using.

@Sinled
Copy link

Sinled commented Jan 8, 2024

@kepano There is unnecessary margin on table element,

Screenshot 2024-01-08 at 13 30 30

At the same time there are similar margins on table containing element
Screenshot 2024-01-08 at 13 32 40

No additional table related classes for this note.
Maximize table width is set to always fill, and i am using latest (7.4.7) version of theme

Here are full settings related to tables
Screenshot 2024-01-08 at 13 35 25

At the moment i fixed it with custom styles removing margin from table, but it seems, as mentioned before, removing important from marging-inline here

.markdown-preview-view.is-readable-line-width .markdown-preview-sizer .cm-table-widget,
.markdown-preview-view.is-readable-line-width .markdown-preview-sizer>div:has(>table),
.markdown-source-view.mod-cm6.is-readable-line-width .cm-contentContainer.cm-contentContainer>.cm-content .cm-table-widget, 
.markdown-source-view.mod-cm6.is-readable-line-width .cm-contentContainer.cm-contentContainer>.cm-content>div:has(>table) {
    width: var(--container-table-width);
    max-width: var(--container-table-max-width);
    margin-inline: var(--container-table-margin)!important;
}

also fixes problem

@kepano
Copy link
Owner

kepano commented Jan 8, 2024

@Sinled I am not able to reproduce this. Can you share the following:

  1. a .md file where the issue is present
  2. your debug info (Command Palette → Show Debug info)
  3. are you using a table width setting in Minimal Theme Settings?

@Sinled
Copy link

Sinled commented Jan 11, 2024

@kepano

  1. It is nothing fancy, mimimal reproduction for me is just empty file with simple table
|               |     |
| ------------- | --- |
| **Budget, $** |     |
| **Status**    |     |
| **Category**  |     |
Debug info
SYSTEM INFO:
	Obsidian version: v1.5.3
	Installer version: v1.4.16
	Operating system: Darwin Kernel Version 22.6.0: Tue Nov  7 21:40:08 PST 2023; root:xnu-8796.141.3.702.9~2/RELEASE_ARM64_T6000 22.6.0
	Login status: not logged in
	Insider build toggle: off
	Live preview: off
	Base theme: light
	Community theme: Minimal v7.4.7
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 33
	Plugins enabled: 30
		1: Advanced Tables v0.20.0
		2: Auto Card Link v1.2.2
		3: Banners v1.3.3
		4: Contextual Typography v2.2.5
		5: Dataview v0.5.64
		6: Excalidraw v2.0.15
		7: Iconize v2.9.0
		8: Linter v1.22.0
		9: Paste URL into selection v1.7.0
		10: QuickAdd v1.6.1
		11: Tag Wrangler v0.6.1
		12: Templater v2.1.0
		13: Various Complements v9.1.0
		14: Vimrc Support v0.9.0
		15: Projects v1.17.1
		16: Book Search v0.5.11
		17: Readwise Official v2.0.1
		18: Auto Note Mover v1.2.0
		19: Settings Search v1.3.10
		20: Awesome Flashcard v0.1.2
		21: Sortable v0.3.1
		22: Advanced URI v1.38.1
		23: Metadata Extractor v1.1.0
		24: Homepage v3.6.0
		25: Plugin Update Tracker v1.5.2
		26: Paste image rename v1.6.1
		27: Importer v1.5.6
		28: Folder notes v1.7.3
		29: Style Settings v1.0.7
		30: Minimal Theme Settings v7.3.1

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
  1. Those settings are from Style settings / mimimal , i've disabled all custom css snippets, and tried disabling Minimal Theme Settings - problem still present. Disabling Styles Settings removes unnecessary margins, but table losses all styles, width, coloration, hover etc

@kepano
Copy link
Owner

kepano commented Jan 11, 2024

Have you tried disabling Contextual Typography? This plugin causes conflicts.

@Sinled
Copy link

Sinled commented Jan 11, 2024

@kepano Just tried disabling Contextual Typography - it has no effect, also tried disabling all other plugins, only style settings visually affects tables.

@kepano
Copy link
Owner

kepano commented Jan 11, 2024

Did you restart the app after disabling Contextual Typography?

@Sinled
Copy link

Sinled commented Jan 12, 2024

@kepano yes, I checked after i've restarted app.

I will probably dig deeper on weekend and will try to reproduce in clean vault. But judging from dev tools both styles that affect table and its container are coming from Minimal Theme

@DZL1943
Copy link

DZL1943 commented May 5, 2024

Is this problem still unresolved?
I haven't updated the theme for several months now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants