styles: expand snippets when on mobile

This commit is contained in:
Maciej Jur 2024-02-14 23:50:53 +01:00
parent 6397b8a8c9
commit 39be3368d2
Signed by: kamov
GPG key ID: 191CBFF5F72ECAFD
3 changed files with 12 additions and 4 deletions

View file

@ -62,6 +62,7 @@ Next we need to import all the external libraries required to compile for Node.
napi = { version = "2.12.2", default-features = false, features = ["napi4"] }
napi-derive = "2.12.2"
```
In this section we define the dependencies required for the project. We need to
use the `napi` crate. The feature flag indicates compatibility with Node.js N-API version 4.
The comment provides a link to the Node.js documentation explaining the N-API version matrix.
@ -78,6 +79,7 @@ In this section, we define build dependencies. Build dependencies are dependenci
lto = true
strip = "symbols"
```
We can add Treesitter dependencies like this.
```toml
@ -91,7 +93,6 @@ tree-sitter-astro = { git = "https://github.com/virchau13/tree-sitter-astro.git"
tree-sitter-css = "0.20.0"
tree-sitter-html = "0.20.0"
tree-sitter-javascript = "0.20.3"
```
In Rust we need to create a function which will be callable from the JavaScript

View file

@ -40,7 +40,7 @@
.kanagawa {
background-color: var(--kngw-sumiInk1);
border: 0.25rem solid var(--kngw-sumiInk3);
border-color: var(--kngw-sumiInk3);
color: var(--kngw-fujiWhite);
&::before {

View file

@ -106,8 +106,15 @@
.listing {
position: relative;
border-radius: 0.5rem;
margin: 1em 0.5em;
margin: 1em -1em;
border-width: 0.25em 0;
border-style: solid;
@media (min-width: 600px) {
margin: 1em 0.5em;
border-width: 0.25rem;
border-radius: 0.5rem;
}
&::before {
content: attr(data-lang);