forked from dfinity/nns-dapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NNS1-3094: Remove extra padding from staking island (dfinity#5234)
# Motivation The staking table is currently narrower than the tokens table which is not intended. Both are inside an element with `width: var(--island-width)` but the staking table uses this style on a `main` element which gets additional padding from a global style. While testing this, I also noticed that when the window gets narrow, the tokens table gets double padding. Once from the padding on the `main` element and once from the subtraction on the `--island-max-width` style [which is set to](https://github.com/dfinity/gix-components/blob/4b072e97fda2c0866bd6a355661cfda5fe44ac18/src/lib/styles/global/variables.scss#L45) `calc(100% - 6 * var(--padding))`. This doesn't seem to be intended either. # Changes 1. Remove `max-width` style on the `MainWrapper` component. 2. Rename `MainWrapper` to `IslandWidthMain` and move it from `components/tokens` to `components/layout`. 3. Reuse the `IslandWidthMain` in the `Staking` component to guarantee consistency. # Tests Manually at https://qsgjb-riaaa-aaaaa-aaaga-cai.dskloet-ingress.devenv.dfinity.network/ # Todos - [ ] Add entry to changelog (if necessary). not yet
- Loading branch information
Showing
5 changed files
with
24 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<script lang="ts"> | ||
import Content from "$lib/components/layout/Content.svelte"; | ||
import IslandWidthMain from "$lib/components/layout/IslandWidthMain.svelte"; | ||
import Layout from "$lib/components/layout/Layout.svelte"; | ||
import LayoutList from "$lib/components/layout/LayoutList.svelte"; | ||
import MainWrapper from "$lib/components/tokens/MainWrapper.svelte"; | ||
import { i18n } from "$lib/stores/i18n"; | ||
</script> | ||
|
||
<LayoutList title={$i18n.navigation.tokens}> | ||
<Layout> | ||
<Content> | ||
<MainWrapper> | ||
<IslandWidthMain> | ||
<slot /> | ||
</MainWrapper> | ||
</IslandWidthMain> | ||
</Content> | ||
</Layout> | ||
</LayoutList> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<script lang="ts"> | ||
import Content from "$lib/components/layout/Content.svelte"; | ||
import IslandWidthMain from "$lib/components/layout/IslandWidthMain.svelte"; | ||
import Layout from "$lib/components/layout/Layout.svelte"; | ||
import LayoutList from "$lib/components/layout/LayoutList.svelte"; | ||
import MainWrapper from "$lib/components/tokens/MainWrapper.svelte"; | ||
import { i18n } from "$lib/stores/i18n"; | ||
</script> | ||
|
||
<LayoutList title={$i18n.navigation.tokens}> | ||
<Layout> | ||
<Content> | ||
<MainWrapper> | ||
<IslandWidthMain> | ||
<slot /> | ||
</MainWrapper> | ||
</IslandWidthMain> | ||
</Content> | ||
</Layout> | ||
</LayoutList> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters