Skip to content

Instantly share code, notes, and snippets.

@Fizder
Created February 14, 2026 08:50
Show Gist options
  • Select an option

  • Save Fizder/1833ca564f9def74211016f2e4617735 to your computer and use it in GitHub Desktop.

Select an option

Save Fizder/1833ca564f9def74211016f2e4617735 to your computer and use it in GitHub Desktop.
Obsidian CSS Snippet to automatically hide Properties in a file upon opening.
/* ======================================================================= */
/* Snippet 1: Hide Properties (YAML frontmatter) for the 'no-props' class */
/* ======================================================================= */
/* Hides the properties completely in both Reading View and Live Preview
for any note that has 'no-props' in its cssclasses frontmatter */
.no-props .metadata-container {
display: none !important;
}
/* ======================================================================= */
/* Snippet 2: Full Width Banner/Content for the 'wide-banner' class */
/* ======================================================================= */
/* This section ensures the banner and note content take full width in
Reading View, even if 'Readable Line Length' is enabled globally. */
/* Forces the specific banner wrapper to ignore default max-width limits in Reading View */
.markdown-preview-view.wide-banner .obsidian-banner-wrapper {
max-width: unset !important;
width: 100% !important;
margin: 0 !important;
}
/* Also ensures the main content area (sizer) is full width in Reading View */
.markdown-preview-view.wide-banner .markdown-preview-sizer {
max-width: 100% !important;
margin: auto !important;
}
/* For Live Preview, ensures the general view ignores line width limits */
.wide-banner {
--file-line-width: 100% !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment