Skip to content

Commit 4f1db23

Browse files
committed
Fix code shaking on interaction
1 parent 0feff5a commit 4f1db23

4 files changed

Lines changed: 25 additions & 3 deletions

File tree

.vitepress/theme/CodeTabs.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ const getIcon = (tab: Tab) => {
125125
.ide-tab.active {
126126
background: var(--vp-code-block-bg);
127127
color: var(--vp-c-text-1);
128-
border-bottom: 2px solid var(--vp-c-brand-1);
129-
margin-bottom: -1px;
128+
box-shadow: inset 0 -2px 0 var(--vp-c-brand-1);
130129
}
131130
132131
.tab-icon {

.vitepress/theme/style.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ html {
122122
.vp-doc .vp-code-group:hover,
123123
.vp-doc div[class*="language-"]:hover {
124124
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
125-
transform: translateY(-2px);
126125
}
127126

128127
/* Custom info/tip boxes */

docs/inline-tests.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,15 @@ public function createUser(string $email): User
105105
// ...
106106
}
107107
```
108+
109+
In PHP 8.6 this becomes even more elegant with [partial application](https://wiki.php.net/rfc/partial_function_application_v2):
110+
111+
```php
112+
use Testo\Assert;
113+
114+
#[TestInline([10, 3], Assert::greaterThan(3, ?))]
115+
public function divide(int $a, int $b): float
116+
{
117+
return $a / $b;
118+
}
119+
```

ru/docs/inline-tests.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,15 @@ public function createUser(string $email): User
105105
// ...
106106
}
107107
```
108+
109+
В PHP 8.6 это станет ещё элегантнее благодаря [partial application](https://wiki.php.net/rfc/partial_function_application_v2):
110+
111+
```php
112+
use Testo\Assert;
113+
114+
#[TestInline([10, 3], Assert::greaterThan(3, ?))]
115+
public function divide(int $a, int $b): float
116+
{
117+
return $a / $b;
118+
}
119+
```

0 commit comments

Comments
 (0)