From 07238c4cdef5696f3556aca6292fa30c2ebe0be1 Mon Sep 17 00:00:00 2001 From: tyranron Date: Fri, 8 Jul 2022 14:52:51 +0000 Subject: [PATCH] deploy: eb974fe3ac3ee8515425b9da220fee3f079cc55c --- master/ayu-highlight.css | 1 - master/css/chrome.css | 49 +++++++++++++++++++++++++++++++++++---- master/css/general.css | 13 +++++++++-- master/highlight.css | 1 - master/print.html | 4 ++-- master/tomorrow-night.css | 2 -- master/types/enums.html | 4 ++-- 7 files changed, 59 insertions(+), 15 deletions(-) diff --git a/master/ayu-highlight.css b/master/ayu-highlight.css index 0c45c6f1..32c94322 100644 --- a/master/ayu-highlight.css +++ b/master/ayu-highlight.css @@ -8,7 +8,6 @@ Original by Dempfi (https://github.com/dempfi/ayu) overflow-x: auto; background: #191f26; color: #e6e1cf; - padding: 0.5em; } .hljs-comment, diff --git a/master/css/chrome.css b/master/css/chrome.css index 21c08b93..53a54c85 100644 --- a/master/css/chrome.css +++ b/master/css/chrome.css @@ -208,24 +208,63 @@ pre { pre > .buttons { position: absolute; z-index: 100; - right: 5px; - top: 5px; + right: 0px; + top: 2px; + margin: 0px; + padding: 2px 0px; color: var(--sidebar-fg); cursor: pointer; + visibility: hidden; + opacity: 0; + transition: visibility 0.1s linear, opacity 0.1s linear; +} +pre:hover > .buttons { + visibility: visible; + opacity: 1 } pre > .buttons :hover { color: var(--sidebar-active); + border-color: var(--icons-hover); + background-color: var(--theme-hover); } pre > .buttons i { margin-left: 8px; } pre > .buttons button { - color: inherit; - background: transparent; - border: none; cursor: inherit; + margin: 0px 5px; + padding: 3px 5px; + font-size: 14px; + + border-style: solid; + border-width: 1px; + border-radius: 4px; + border-color: var(--icons); + background-color: var(--theme-popup-bg); + transition: 100ms; + transition-property: color,border-color,background-color; + color: var(--icons); } +@media (pointer: coarse) { + pre > .buttons button { + /* On mobile, make it easier to tap buttons. */ + padding: 0.3rem 1rem; + } +} +code { + padding: 1rem; +} + +/* FIXME: ACE editors overlap their buttons because ACE does absolute + positioning within the code block which breaks padding. The only solution I + can think of is to move the padding to the outer pre tag (or insert a div + wrapper), but that would require fixing a whole bunch of CSS rules. +*/ +.hljs.ace_editor { + padding: 0rem 0rem; +} + pre > .result { margin-top: 10px; } diff --git a/master/css/general.css b/master/css/general.css index ef2ba504..0e4f07a5 100644 --- a/master/css/general.css +++ b/master/css/general.css @@ -26,6 +26,16 @@ code { font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */ } +/* make long words/inline code not x overflow */ +main { + overflow-wrap: break-word; +} + +/* make wide tables scroll if they overflow */ +.table-wrapper { + overflow-x: auto; +} + /* Don't change font size in headers. */ h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { font-size: unset; @@ -80,8 +90,7 @@ h6:target::before { .content { overflow-y: auto; - padding: 0 15px; - padding-bottom: 50px; + padding: 0 5px 50px 5px; } .content main { margin-left: auto; diff --git a/master/highlight.css b/master/highlight.css index c2343227..ba57b82b 100644 --- a/master/highlight.css +++ b/master/highlight.css @@ -61,7 +61,6 @@ overflow-x: auto; background: #f6f7f6; color: #000; - padding: 0.5em; } .hljs-emphasis { diff --git a/master/print.html b/master/print.html index 5523255c..99c024e2 100644 --- a/master/print.html +++ b/master/print.html @@ -1342,7 +1342,7 @@ enum StarWarsEpisode { fn main() {}

Supported Macro Attributes (Derive)

- +
Name of AttributeContainer SupportField Support
@@ -1353,7 +1353,7 @@ enum StarWarsEpisode {
Name of AttributeContainer SupportField Support
context?
deprecated
description
skip?
✔: supported✘: not supported?: not available
-

Interfaces

+

Interfaces

GraphQL interfaces map well to interfaces known from common object-oriented languages such as Java or C#, but Rust, unfortunately, has no concept that maps perfectly to them. The nearest analogue of GraphQL interfaces are Rust traits, and the main difference is that in GraphQL an interface type serves both as an abstraction and a boxed value (downcastable to concrete implementers), while in Rust, a trait is an abstraction only and to represent such a boxed value a separate type is required, like enum or trait object, because Rust trait doesn't represent a type itself, and so can have no values. This difference imposes some unintuitive and non-obvious corner cases when we try to express GraphQL interfaces in Rust, but on the other hand gives you full control over which type is backing your interface, and how it's resolved.

For implementing GraphQL interfaces Juniper provides the #[graphql_interface] macro.

Traits

diff --git a/master/tomorrow-night.css b/master/tomorrow-night.css index f7197925..5b4aca77 100644 --- a/master/tomorrow-night.css +++ b/master/tomorrow-night.css @@ -81,8 +81,6 @@ overflow-x: auto; background: #1d1f21; color: #c5c8c6; - padding: 0.5em; - -webkit-text-size-adjust: none; } .coffeescript .javascript, diff --git a/master/types/enums.html b/master/types/enums.html index c429055f..f4650619 100644 --- a/master/types/enums.html +++ b/master/types/enums.html @@ -184,7 +184,7 @@ enum StarWarsEpisode { fn main() {}

Supported Macro Attributes (Derive)

- +
Name of AttributeContainer SupportField Support
@@ -195,7 +195,7 @@ enum StarWarsEpisode {
Name of AttributeContainer SupportField Support
context?
deprecated
description
skip?
✔: supported✘: not supported?: not available
- +