Skip to content

Commit bdb5ba5

Browse files
committed
Fixed issues with rounded borders on code blocks in some cases
1 parent f7be5c7 commit bdb5ba5

File tree

11 files changed

+54
-42
lines changed

11 files changed

+54
-42
lines changed

material/assets/javascripts/bundle.748e2769.min.js renamed to material/assets/javascripts/bundle.9efd901c.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/javascripts/bundle.748e2769.min.js.map renamed to material/assets/javascripts/bundle.9efd901c.min.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/stylesheets/main.27ad92d8.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/stylesheets/main.27ad92d8.min.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/stylesheets/main.8c5ef100.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

material/assets/stylesheets/main.8c5ef100.min.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

material/assets/stylesheets/palette.9647289d.min.css renamed to material/assets/stylesheets/palette.cc9b2e1e.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/stylesheets/palette.9647289d.min.css.map renamed to material/assets/stylesheets/palette.cc9b2e1e.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/base.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
{% endif %}
3535
{% endblock %}
3636
{% block styles %}
37-
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.8c5ef100.min.css' | url }}">
37+
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.27ad92d8.min.css' | url }}">
3838
{% if config.theme.palette %}
3939
{% set palette = config.theme.palette %}
40-
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.9647289d.min.css' | url }}">
40+
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.cc9b2e1e.min.css' | url }}">
4141
{% if palette.primary %}
4242
{% import "partials/palette.html" as map %}
4343
{% set primary = map.primary(
@@ -214,7 +214,7 @@
214214
</script>
215215
{% endblock %}
216216
{% block scripts %}
217-
<script src="{{ 'assets/javascripts/bundle.748e2769.min.js' | url }}"></script>
217+
<script src="{{ 'assets/javascripts/bundle.9efd901c.min.js' | url }}"></script>
218218
{% for path in config["extra_javascript"] %}
219219
<script src="{{ path | url }}"></script>
220220
{% endfor %}

src/assets/stylesheets/main/extensions/pymdownx/_highlight.scss

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -314,20 +314,21 @@
314314
// Scoped in typesetted content to match specificity of regular content
315315
.md-typeset {
316316

317-
// Code block with line numbers
317+
// Code block with line numbers - unfortunately, these selectors need to be
318+
// overly specific so they don't bleed into code blocks in annotations.
318319
.highlighttable {
319320
margin: 1em 0;
320321
direction: ltr;
321322

322-
// Remove rounded borders on left side
323-
code {
323+
// Remove rounded borders on code blocks
324+
> tbody > tr > .code > div > pre > code {
324325
border-top-left-radius: 0;
325326
border-bottom-left-radius: 0;
326327
}
327328
}
328329

329330
// Code block result container
330-
:is(.highlight, .highlighttable) + .result {
331+
.highlight + .result {
331332
margin-top: calc(-1em + #{px2em(-2px)});
332333
padding: 0 px2em(16px);
333334
overflow: visible;
@@ -356,14 +357,17 @@
356357
.md-content__inner > .highlight {
357358
margin: 1em px2rem(-16px);
358359

359-
// Highlighted line
360-
.hll {
361-
margin: 0 px2rem(-16px);
362-
padding: 0 px2rem(16px);
360+
// Remove rounded borders
361+
> .filename,
362+
> pre > code {
363+
border-radius: 0;
363364
}
364365

365-
// Remove rounded borders
366-
code {
366+
// Code block with line numbers - unfortunately, these selectors need to be
367+
// overly specific so they don't bleed into code blocks in annotations.
368+
> .highlighttable > tbody > tr > .filename span.filename,
369+
> .highlighttable > tbody > tr > .linenos,
370+
> .highlighttable > tbody > tr > .code > div > pre > code {
367371
border-radius: 0;
368372
}
369373

@@ -374,16 +378,4 @@
374378
border-radius: 0;
375379
}
376380
}
377-
378-
// Top-level code block with line numbers
379-
.md-content__inner > .highlighttable {
380-
margin: 1em px2rem(-16px);
381-
border-radius: 0;
382-
383-
// Highlighted line
384-
.hll {
385-
margin: 0 px2rem(-16px);
386-
padding: 0 px2rem(16px);
387-
}
388-
}
389381
}

0 commit comments

Comments
 (0)