Skip to content

Inline code style for admonition seems odd due to override #2492

@polarathene

Description

@polarathene
  • I've read the [contribution guidelines][1] and agree with them

I've found a bug and checked that ...

  • ... the problem doesn't occur with the default MkDocs template
  • ... the problem is not in any of my customizations (CSS, JS, template)
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

I don't quite get the reasoning for this override?:

// Omit background on inline code blocks, as they don't go well with the
// pastelly tones applied to admonition titles
code {
margin: initial;
padding: initial;
color: currentColor;
background-color: transparent;
border-radius: initial;
box-shadow: none;
}

How is the override visually better? If it was a concern for the user they might as well at that point just not use the inline code syntax?

If the concern is with contrast, wouldn't it be better to instead use alpha?

Expected behavior

EDIT: See the comparison images below in the 2nd message.

original examples

Any of the following:

  1. Restore bg-color:
    Screenshot_20210326_191218

  2. Full restore:
    Screenshot_20210326_191806

  3. Change bg-color to brighter shade with opacity (#ffffffbf):
    Screenshot_20210326_192119

  4. Change bg-color to darker shade with opacity (#3a3a3a30):
    Screenshot_20210326_193014

  5. Change bg-color to better match admonition colour (#d7d7d7ad with CSS mix-blend-mode: multiply):
    Screenshot_20210326_193301

  6. or with mix-blend-mode: luminosity:
    Screenshot_20210326_193734

Personally 3 or 6 look quite nice.

Actual behavior

Screenshot_20210326_191133

Package versions / Project configuration / System information

Active release used for project demo site (if modified to use an inline code block in admonition title): https://squidfunk.github.io/mkdocs-material/reference/admonitions

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions