Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reworked navbar component #3648

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: implemented new UI for platform-tags
  • Loading branch information
berezinant committed Jul 26, 2024
commit 783d301a6e62833014f2164d678a974e00039b92
Original file line number Diff line number Diff line change
@@ -0,0 1,5 @@
/*
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import './styles.scss';
Original file line number Diff line number Diff line change
@@ -0,0 1,10 @@
/*!
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
@import '../tokens/index';

.filter-section {
display: flex;
flex-wrap: wrap;
gap: 2px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 2,8 @@
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

@import 'tabs/styles';
@import 'filter-section/styles';
@import 'navbar/styles';
@import 'platform-tag/styles';
@import 'platform-tags/styles';
@import 'tabs/styles';
Original file line number Diff line number Diff line change
@@ -1,8 1,10 @@
/*
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
import * as filterSection from './filter-section/index';
import * as navbar from './navbar/index';
import * as platformTag from './platform-tag/index';
import * as platformTags from './platform-tags/index';
import * as tabs from './tabs/index';

export { navbar, tabs, platformTag };
export { filterSection, navbar, tabs, platformTag, platformTags };
Original file line number Diff line number Diff line change
@@ -1,29 1,22 @@
/*!
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

.platform-tags,
.filter-section {
display: flex;
flex-wrap: wrap;

margin-bottom: -8px;
margin-left: -4px;
}
@import '../tokens/index';

.platform-tag {
--platform-tag-color: #bababb;

margin-right: 4px;
margin-bottom: 8px;
padding: 10px 12px;

cursor: pointer;

text-transform: capitalize;

border: 0 none;

font-family: var(--default-font-family);
font-size: 13px;
line-height: 1.5;
border-radius: var(--size-s1);

font: var(--font-text-s);
}

.platform-tag.js-like,
Expand All @@ -32,14 25,6 @@
text-transform: uppercase;
}

.filter-section .platform-tag {
padding: 2px 16px;

cursor: pointer;

border-radius: 4px;
}

.platform-tags .platform-tag {
display: flex;
align-items: center;
Expand Down Expand Up @@ -76,14 61,10 @@
}

.filter-section .platform-tag:not([data-active]) {
color: #fff;
background-color: rgba(255, 255, 255, 0.05);

/* Safari doesn't work correctly for `outline` with `border-radius` */
/* outline: 1px solid rgba(255,255,255,.6); */
/* ...use `box-shadow` instead: */
text-decoration: line-through;

box-shadow: 0 0 0 1px rgb(255 255 255 / 60%);
color: var(--color-w50);
background-color: var(--color-w10);
}

.platform-tags .platform-tag::before {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 1,5 @@
/*
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

import './styles.scss';
Original file line number Diff line number Diff line change
@@ -0,0 1,11 @@
/*!
* Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

.platform-tags {
display: flex;
flex-wrap: wrap;

margin-bottom: -8px;
margin-left: -4px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 4,13 @@

:root {
--font-family-default: JetBrains Sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
--font-family-mono: JetBrains Mono, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
--font-h1: 600 44px/44px var(--font-family-default);
--font-h2: 600 32px/32px var(--font-family-default);
--font-h3: 600 24px/24px var(--font-family-default);
--font-h4: 600 16px/24px var(--font-family-default);
--font-text-m: 400 16px/24px var(--font-family-default);
--font-text-s: 400 13px/24px var(--font-family-default);
--font-text-s: 400 14px/20px var(--font-family-default);
--font-code: 400 16px/24px var(--font-family-mono);
}

Large diffs are not rendered by default.