mirror of
https://github.com/hacks-guide/minimal-mistakes.git
synced 2024-11-23 00:39:47 +00:00
Try fixing copy button flying out
This commit is contained in:
parent
14e3fa2b28
commit
4f76c2546a
@ -2,6 +2,10 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fix copy button going out of range for invalid syntax highlighting blocks.
|
||||
|
||||
### Enhancements
|
||||
|
||||
- Change the icon of a copy button into a tick for 1.5 seconds on successful copy.
|
||||
|
@ -139,6 +139,10 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:not(pre) > code {
|
||||
padding-top: 0.1rem;
|
||||
padding-bottom: 0.1rem;
|
||||
|
@ -608,6 +608,10 @@ a.reversefootnote {
|
||||
}
|
||||
|
||||
pre {
|
||||
&.highlight .clipboard-copy-button {
|
||||
color: #ffffca;
|
||||
}
|
||||
|
||||
.clipboard-copy-button {
|
||||
display: block;
|
||||
position: absolute;
|
||||
@ -621,14 +625,9 @@ pre {
|
||||
outline: none;
|
||||
border-radius: 0.1em;
|
||||
padding: 0.2em 0.5em;
|
||||
color: white;
|
||||
opacity: 0.4;
|
||||
transition: color 0.25s linear -0.25s, opacity 0.25s linear;
|
||||
|
||||
&:hover {
|
||||
color: #ffffca;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
|
@ -5,7 +5,7 @@ permalink: "/docs/history/"
|
||||
excerpt: Change log of enhancements and bug fixes made to the theme.
|
||||
sidebar:
|
||||
nav: docs
|
||||
last_modified_at: '2024-05-06T01:20:38+08:00'
|
||||
last_modified_at: '2024-05-06T21:06:31+08:00'
|
||||
toc: false
|
||||
---
|
||||
|
||||
@ -17,6 +17,10 @@ toc: false
|
||||
{% raw %}
|
||||
## Unreleased
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Fix copy button going out of range for invalid syntax highlighting blocks.
|
||||
|
||||
### Enhancements
|
||||
|
||||
- Change the icon of a copy button into a tick for 1.5 seconds on successful copy.
|
||||
|
33
docs/_posts/2009-10-06-edge-case-broken-highlighting.md
Normal file
33
docs/_posts/2009-10-06-edge-case-broken-highlighting.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: "Edge Case: Invalid syntax highlight languages"
|
||||
categories:
|
||||
- Edge Case
|
||||
tags:
|
||||
- content
|
||||
- css
|
||||
- edge case
|
||||
---
|
||||
|
||||
Good highlighting:
|
||||
|
||||
```ruby
|
||||
str = ARGV.first
|
||||
if str
|
||||
str = str.b[/\A_(.*)_\z/, 1]
|
||||
if str and Gem::Version.correct?(str)
|
||||
version = str
|
||||
ARGV.shift
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Bad highlighting:
|
||||
|
||||
```invalid
|
||||
if Gem.respond_to?(:activate_bin_path)
|
||||
load Gem.activate_bin_path('jekyll', 'jekyll', version)
|
||||
else
|
||||
gem "jekyll", version
|
||||
load Gem.bin_path("jekyll", "jekyll", version)
|
||||
end
|
||||
```
|
Loading…
Reference in New Issue
Block a user