Skip to content

Commit

Permalink
Improve admonitions' look
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Apr 14, 2024
1 parent 2d79cff commit 89e48e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion public/_sass/parts/admonitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

.admonition {
border-left: 0.3em solid var(--admonition-color);
padding: 0 1em;
background: padding-box color-mix(in srgb, var(--admonition-color), transparent 90%);
padding: 0.5em 1em;
}

.admonition-note {
Expand All @@ -22,9 +23,15 @@
}

.admonition-icon {
overflow: hidden; // ensures the floating ::before stays contained within this element
&::before {
float: left;
margin-right: 1em;
}
&.large-icon::before {
font-size: 200%;
margin-right: 0.5em;
}
&.admonition-note::before {
content: '💡';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ With networking and item NBT being completely redone, Cardinal Components API ha
This page details the main changes in the 6.0.0 update, and how to deal with them.

Note that the 6.0.0 update is not completely done yet, and therefore this page may be amended before the full release.
{:.admonition.admonition-warning.admonition-icon}
{:.admonition.admonition-warning.admonition-icon.large-icon}

## Package migration

Expand All @@ -37,9 +37,11 @@ then replacing `public void applySyncPacket(PacketByteBuf` with `public void app

## Changes to the Item module

**Item components have been entirely removed from Cardinal Components API.**
{:.admonition.admonition-warning}

With Minecraft 1.20.5 adding data components for item stacks,
all the functionality of the `cardinal-components-item` module has been superseded by vanilla components and Fabric API's [API Lookup API](https://github.com/FabricMC/fabric/blob/1.20.5/fabric-api-lookup-api-v1/README.md).
As such, **item components have been entirely removed from Cardinal Components API.**

You can find an example of a component interface reimplemented with the new APIs in [CCA's test mod](https://github.com/Ladysnake/Cardinal-Components-API/blob/1.20.5/src/testmod/java/org/ladysnake/componenttest/content/vita/ItemVita.java).
The basic idea is:
Expand Down

0 comments on commit 89e48e0

Please sign in to comment.