Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

3.6 KB
Raw Blame
* {
  -webkit-overflow-scrolling: touch;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  box-sizing: border-box;
}

:root {
  --noise-background: url(./noise.avif);
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
div,
dl,
dt,
dd,
ul,
ol,
li,
p,
blockquote,
pre,
hr,
figure,
table,
caption,
th,
td,
form,
fieldset,
legend,
input,
button,
textarea,
menu {
  margin: 0;
  padding: 0;
}

header,
footer,
section,
article,
aside,
nav,
hgroup,
address,
figure,
figcaption,
menu,
details {
  display: block;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

caption,
th {
  text-align: left;
  font-weight: normal;
}

html,
body,
fieldset,
img,
iframe,
abbr {
  border: 0;
}

i,
cite,
em,
var,
address,
dfn {
  font-style: normal;
}

[hidefocus],
summary {
  outline: 0;
}

li {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
small {
  font-size: 100%;
}

sup,
sub {
  font-size: 83%;
}

pre,
code,
kbd,
samp {
  font-family: inherit;
}

q:before,
q:after {
  content: none;
}

textarea {
  overflow: auto;
  resize: none;
}

label,
summary {
  cursor: default;
}

a,
button:not([disabled]) {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b {
  font-weight: bold;
}

del,
ins,
u,
s,
a,
a:hover {
  text-decoration: none;
}

body,
textarea,
input,
button,
select,
keygen,
legend {
  background-color: unset;
  outline: 0;
  border: 0;
  font-size: var(--affine-font-base);
  font-family: inherit;
  font-feature-settings: 'calt' 0;
}

body {
  background: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

input {
  border: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  /*Solve the rounded corners of buttons on ios*/
  border-radius: 0;
  /*Solve the problem of rounded corners of the input box on ios*/
  outline: medium;
  /*Remove the default yellow border on mouse click*/
  background-color: transparent;
  caret-color: var(--affine-primary-color);
}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset;
}

input[type='number'] {
  -moz-appearance: textfield;
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

* {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE 10+ */
}

::-webkit-scrollbar {
  width: 0;
  /* Chrome Safari */
  height: 0;
}

editor-host * {
  scrollbar-width: auto;
  -ms-overflow-style: -ms-autohiding-scrollbar;
}
editor-host *::-webkit-scrollbar {
  width: auto;
  height: auto;
}

.editor-wrapper {
  position: relative;
  padding-right: 0;
}

/* issue: https://github.com/toeverything/AFFiNE/issues/2004 */
.editor-wrapper.edgeless-mode {
  padding: 0;
}

.affine-default-page-block-title-container {
  margin-top: 40px;
  margin-bottom: 40px;
  transition: margin-top 0.2s;
}

.affine-default-page-block-container {
  transition: max-width 0.2s;
  min-width: 550px;
}

affine-block-hub {
  position: unset !important;
}

.block-hub-menu-container {
  position: unset !important;
}

@media (max-width: 768px) {
  .affine-default-page-block-title-container {
    margin-top: 24px;
  }

  .editor-wrapper {
    width: 100%;
  }

  /* issue: https://github.com/toeverything/AFFiNE/issues/2004 */
  .editor-wrapper.edgeless-mode {
    padding: 0;
  }
}

html,
body,
#app {
  height: 100%;
  position: relative;
  overflow: clip;
}

/**
 * A hack to make the anchor wrapper not affect the layout of the page.
 */
[data-lit-react-wrapper],
affine-lit-template-wrapper {
  display: contents;
}

/* Avoid color overriden by user-agent */
button,
input {
  color: inherit;
}

/* Avoid default outline on focus for contenteditable */
[contenteditable]:focus-visible {
  outline: none;
}