code.gitea.io/gitea@v1.22.3/web_src/css/markup/content.css (about)

     1  .markup {
     2    overflow: hidden;
     3    font-size: 16px;
     4    line-height: 1.5 !important;
     5    overflow-wrap: break-word;
     6  }
     7  
     8  .conversation-holder .markup {
     9    overflow-wrap: anywhere; /* prevent overflow in code comments. TODO: properly restrict .conversation-holder width and remove this */
    10  }
    11  
    12  .markup > *:first-child {
    13    margin-top: 0 !important;
    14  }
    15  
    16  .markup > *:last-child {
    17    margin-bottom: 0 !important;
    18  }
    19  
    20  .markup a:not([href]) {
    21    color: inherit;
    22    text-decoration: none;
    23  }
    24  
    25  .markup .absent {
    26    color: var(--color-red);
    27  }
    28  
    29  .markup .anchor {
    30    float: left;
    31    padding-right: 4px;
    32    margin-left: -20px;
    33    color: inherit;
    34  }
    35  
    36  .markup .anchor .svg {
    37    vertical-align: middle;
    38  }
    39  
    40  .markup .anchor:focus {
    41    outline: none;
    42  }
    43  
    44  .markup h1 .anchor {
    45    margin-top: -2px; /* re-align to center */
    46  }
    47  
    48  .markup h1 .anchor .svg,
    49  .markup h2 .anchor .svg,
    50  .markup h3 .anchor .svg,
    51  .markup h4 .anchor .svg,
    52  .markup h5 .anchor .svg,
    53  .markup h6 .anchor .svg {
    54    visibility: hidden;
    55  }
    56  
    57  .markup h1:hover .anchor .svg,
    58  .markup h2:hover .anchor .svg,
    59  .markup h3:hover .anchor .svg,
    60  .markup h4:hover .anchor .svg,
    61  .markup h5:hover .anchor .svg,
    62  .markup h6:hover .anchor .svg {
    63    visibility: visible;
    64  }
    65  
    66  .markup h2 .anchor .svg,
    67  .markup h3 .anchor .svg,
    68  .markup h4 .anchor .svg {
    69    position: relative;
    70    top: -2px;
    71  }
    72  
    73  .markup h1,
    74  .markup h2,
    75  .markup h3,
    76  .markup h4,
    77  .markup h5,
    78  .markup h6 {
    79    margin-top: 24px;
    80    margin-bottom: 16px;
    81    font-weight: var(--font-weight-semibold);
    82    line-height: 1.25;
    83  }
    84  
    85  .markup h1 tt,
    86  .markup h1 code,
    87  .markup h2 tt,
    88  .markup h2 code,
    89  .markup h3 tt,
    90  .markup h3 code,
    91  .markup h4 tt,
    92  .markup h4 code,
    93  .markup h5 tt,
    94  .markup h5 code,
    95  .markup h6 tt,
    96  .markup h6 code {
    97    font-size: inherit;
    98  }
    99  
   100  .markup h1 {
   101    padding-bottom: 0.3em;
   102    font-size: 2em;
   103    border-bottom: 1px solid var(--color-secondary);
   104  }
   105  
   106  .markup h2 {
   107    padding-bottom: 0.3em;
   108    font-size: 1.5em;
   109    border-bottom: 1px solid var(--color-secondary);
   110  }
   111  
   112  .markup h3 {
   113    font-size: 1.25em;
   114  }
   115  
   116  .markup h4 {
   117    font-size: 1em;
   118  }
   119  
   120  .markup h5 {
   121    font-size: 0.875em;
   122  }
   123  
   124  .markup h6 {
   125    font-size: 0.85em;
   126    color: var(--color-text-light-2);
   127  }
   128  
   129  .markup p,
   130  .markup blockquote,
   131  .markup details,
   132  .markup ul,
   133  .markup ol,
   134  .markup dl,
   135  .markup table,
   136  .markup pre {
   137    margin-top: 0;
   138    margin-bottom: 16px;
   139  }
   140  
   141  .markup hr {
   142    height: 4px;
   143    padding: 0;
   144    margin: 16px 0;
   145    background-color: var(--color-secondary);
   146    border: 0;
   147  }
   148  
   149  .markup ul,
   150  .markup ol {
   151    padding-left: 2em;
   152  }
   153  
   154  .markup ul.no-list,
   155  .markup ol.no-list {
   156    padding: 0;
   157    list-style-type: none;
   158  }
   159  
   160  .markup .task-list-item {
   161    list-style-type: none;
   162  }
   163  
   164  .markup .task-list-item p + ul {
   165    margin-top: 16px;
   166  }
   167  
   168  .markup .task-list-item input[type="checkbox"] {
   169    margin: 0 .3em .25em -1.4em;
   170    vertical-align: middle;
   171    padding: 0;
   172  }
   173  
   174  .markup .task-list-item input[type="checkbox"] + p {
   175    margin-left: -0.2em;
   176    display: inline;
   177  }
   178  
   179  .markup .task-list-item > p {
   180    margin-inline: 16px;
   181  }
   182  
   183  .markup .task-list-item + .task-list-item {
   184    margin-top: 4px;
   185  }
   186  
   187  .markup input[type="checkbox"] {
   188    -webkit-appearance: none;
   189    -moz-appearance: none;
   190    appearance: none;
   191    position: relative;
   192    border: 1px solid var(--color-secondary);
   193    border-radius: var(--border-radius);
   194    background: var(--color-input-background);
   195    height: 14px;
   196    width: 14px;
   197    opacity: 1 !important; /* override fomantic on edit preview */
   198    pointer-events: auto !important; /* override fomantic on edit preview */
   199    vertical-align: middle !important; /* override fomantic on edit preview */
   200    -webkit-print-color-adjust: exact;
   201    color-adjust: exact;
   202  }
   203  
   204  .markup input[type="checkbox"]:not([disabled]):hover,
   205  .markup input[type="checkbox"]:not([disabled]):active {
   206    border-color: var(--color-primary);
   207  }
   208  
   209  .markup input[type="checkbox"]::after {
   210    position: absolute;
   211    left: 0;
   212    top: 0;
   213    bottom: 0;
   214    right: 0;
   215    pointer-events: none;
   216    background: var(--color-text);
   217    mask-size: cover;
   218    -webkit-mask-size: cover;
   219  }
   220  
   221  .markup input[type="checkbox"]:checked::after {
   222    content: "";
   223    mask-image: var(--checkbox-mask-checked);
   224    -webkit-mask-image: var(--checkbox-mask-checked);
   225    -webkit-print-color-adjust: exact;
   226    color-adjust: exact;
   227  }
   228  
   229  .markup input[type="checkbox"]:indeterminate::after {
   230    content: "";
   231    mask-image: var(--checkbox-mask-indeterminate);
   232    -webkit-mask-image: var(--checkbox-mask-indeterminate);
   233  }
   234  
   235  .markup ul ul,
   236  .markup ul ol,
   237  .markup ol ol,
   238  .markup ol ul {
   239    margin-top: 0;
   240    margin-bottom: 0;
   241  }
   242  
   243  .markup ol ol,
   244  .markup ul ol {
   245    list-style-type: lower-roman;
   246  }
   247  
   248  .markup li > p {
   249    margin-top: 16px;
   250  }
   251  
   252  .markup li + li {
   253    margin-top: 0.25em;
   254  }
   255  
   256  .markup dl {
   257    padding: 0;
   258  }
   259  
   260  .markup dl dt {
   261    padding: 0;
   262    margin-top: 16px;
   263    font-size: 1em;
   264    font-style: italic;
   265    font-weight: var(--font-weight-semibold);
   266  }
   267  
   268  .markup dl dd {
   269    padding: 0 16px;
   270    margin-bottom: 16px;
   271  }
   272  
   273  .markup blockquote {
   274    margin-left: 0;
   275    padding: 0 15px;
   276    color: var(--color-text-light-2);
   277    border-left: 0.25em solid var(--color-secondary);
   278  }
   279  
   280  .markup blockquote > :first-child {
   281    margin-top: 0;
   282  }
   283  
   284  .markup blockquote > :last-child {
   285    margin-bottom: 0;
   286  }
   287  
   288  .markup table {
   289    display: block;
   290    width: 100%;
   291    width: max-content;
   292    max-width: 100%;
   293    overflow: auto;
   294  }
   295  
   296  .markup table th {
   297    font-weight: var(--font-weight-semibold);
   298  }
   299  
   300  .markup table th,
   301  .markup table td {
   302    padding: 6px 13px !important;
   303    border: 1px solid var(--color-secondary) !important;
   304  }
   305  
   306  .markup table tr {
   307    border-top: 1px solid var(--color-secondary);
   308  }
   309  
   310  .markup table tr:nth-child(2n) {
   311    background-color: var(--color-markup-table-row);
   312  }
   313  
   314  .markup img,
   315  .markup video {
   316    max-width: 100%;
   317    box-sizing: initial;
   318  }
   319  
   320  /* this background ensures images can break <hr>. We can only do this on
   321     cases where the background is known and not transparent. */
   322  .markup.file-view img,
   323  .markup.file-view video,
   324  .comment-body .markup img, /* regular comment */
   325  .comment-body .markup video,
   326  .comment-content .markup img, /* code comment */
   327  .comment-content .markup video,
   328  .wiki .markup img,
   329  .wiki .markup video {
   330    background: var(--color-box-body);
   331  }
   332  
   333  .markup img[align="right"],
   334  .markup video[align="right"] {
   335    padding-left: 20px;
   336  }
   337  
   338  .markup img[align="left"],
   339  .markup video[align="left"] {
   340    padding-right: 28px;
   341  }
   342  
   343  .markup .emoji {
   344    max-width: none;
   345    vertical-align: text-top;
   346  }
   347  
   348  .markup span.frame {
   349    display: block;
   350    overflow: hidden;
   351  }
   352  
   353  .markup span.frame > span {
   354    display: block;
   355    float: left;
   356    width: auto;
   357    padding: 7px;
   358    margin: 13px 0 0;
   359    overflow: hidden;
   360    border: 1px solid var(--color-secondary);
   361  }
   362  
   363  .markup span.frame span img,
   364  .markup span.frame span video {
   365    display: block;
   366    float: left;
   367  }
   368  
   369  .markup span.frame span span {
   370    display: block;
   371    padding: 5px 0 0;
   372    clear: both;
   373    color: var(--color-text);
   374  }
   375  
   376  .markup span.align-center {
   377    display: block;
   378    overflow: hidden;
   379    clear: both;
   380  }
   381  
   382  .markup span.align-center > span {
   383    display: block;
   384    margin: 13px auto 0;
   385    overflow: hidden;
   386    text-align: center;
   387  }
   388  
   389  .markup span.align-center span img,
   390  .markup span.align-center span video {
   391    margin: 0 auto;
   392    text-align: center;
   393  }
   394  
   395  .markup span.align-right {
   396    display: block;
   397    overflow: hidden;
   398    clear: both;
   399  }
   400  
   401  .markup span.align-right > span {
   402    display: block;
   403    margin: 13px 0 0;
   404    overflow: hidden;
   405    text-align: right;
   406  }
   407  
   408  .markup span.align-right span img,
   409  .markup span.align-right span video {
   410    margin: 0;
   411    text-align: right;
   412  }
   413  
   414  .markup span.float-left {
   415    display: block;
   416    float: left;
   417    margin-right: 13px;
   418    overflow: hidden;
   419  }
   420  
   421  .markup span.float-left span {
   422    margin: 13px 0 0;
   423  }
   424  
   425  .markup span.float-right {
   426    display: block;
   427    float: right;
   428    margin-left: 13px;
   429    overflow: hidden;
   430  }
   431  
   432  .markup span.float-right > span {
   433    display: block;
   434    margin: 13px auto 0;
   435    overflow: hidden;
   436    text-align: right;
   437  }
   438  
   439  .markup code,
   440  .markup tt {
   441    padding: 0.2em 0.4em;
   442    margin: 0;
   443    font-size: 85%;
   444    white-space: break-spaces;
   445    background-color: var(--color-markup-code-inline);
   446    border-radius: var(--border-radius);
   447  }
   448  
   449  .markup code br,
   450  .markup tt br {
   451    display: none;
   452  }
   453  
   454  .markup del code {
   455    text-decoration: inherit;
   456  }
   457  
   458  .markup pre > code {
   459    padding: 0;
   460    margin: 0;
   461    font-size: 100%;
   462    white-space: pre-wrap;
   463    word-break: break-all;
   464    overflow-wrap: break-word;
   465    background: transparent;
   466    border: 0;
   467  }
   468  
   469  .markup .highlight {
   470    margin-bottom: 16px;
   471  }
   472  
   473  .markup .highlight pre,
   474  .markup pre {
   475    padding: 16px;
   476    font-size: 85%;
   477    line-height: 1.45;
   478    background-color: var(--color-markup-code-block);
   479    border-radius: var(--border-radius);
   480  }
   481  
   482  .markup .highlight pre {
   483    margin-bottom: 0;
   484    word-break: normal;
   485  }
   486  
   487  .markup pre {
   488    word-wrap: normal;
   489  }
   490  
   491  .markup pre code,
   492  .markup pre tt {
   493    display: inline;
   494    padding: 0;
   495    line-height: inherit;
   496    word-wrap: normal;
   497    background-color: transparent;
   498    border: 0;
   499  }
   500  
   501  .markup pre code::before,
   502  .markup pre code::after,
   503  .markup pre tt::before,
   504  .markup pre tt::after {
   505    content: normal;
   506  }
   507  
   508  .markup kbd {
   509    display: inline-block;
   510    padding: 3px 5px;
   511    font-size: 11px;
   512    line-height: 10px;
   513    color: var(--color-text-light);
   514    vertical-align: middle;
   515    background-color: var(--color-markup-code-inline);
   516    border: 1px solid var(--color-secondary);
   517    border-radius: var(--border-radius);
   518    box-shadow: inset 0 -1px 0 var(--color-secondary);
   519  }
   520  
   521  .markup .ui.list .list,
   522  .markup ol.ui.list ol,
   523  .markup ul.ui.list ul {
   524    padding-left: 2em;
   525  }
   526  
   527  .file-revisions-btn {
   528    display: block;
   529    float: left;
   530    margin-bottom: 2px !important;
   531    padding: 11px !important;
   532    margin-right: 10px !important;
   533  }
   534  
   535  .file-revisions-btn i {
   536    -webkit-touch-callout: none;
   537    -webkit-user-select: none;
   538    user-select: none;
   539  }
   540  
   541  .markup-render {
   542    display: block;
   543    border: none;
   544    width: 100%;
   545    height: var(--height-loading); /* actual height is set in JS after loading */
   546    overflow: hidden;
   547    color-scheme: normal; /* match the value inside the iframe to allow it to become transparent */
   548  }
   549  
   550  .markup-block-error {
   551    display: block !important; /* override fomantic .ui.form .error.message {display: none} */
   552    border: none !important;
   553    margin-bottom: 0 !important;
   554    border-bottom-left-radius: 0 !important;
   555    border-bottom-right-radius: 0 !important;
   556    box-shadow: none !important;
   557    font-size: 85% !important;
   558    white-space: pre-wrap !important;
   559    padding: 0.5rem 1rem !important;
   560    text-align: left !important;
   561  }
   562  
   563  .markup-block-error + pre {
   564    border-top: none !important;
   565    margin-top: 0 !important;
   566    border-top-left-radius: 0 !important;
   567    border-top-right-radius: 0 !important;
   568  }
   569  
   570  .file-view.markup.orgmode li.unchecked::before {
   571    content: "[ ] ";
   572  }
   573  
   574  .file-view.markup.orgmode li.checked::before {
   575    content: "[x] ";
   576  }
   577  
   578  .file-view.markup.orgmode li.indeterminate::before {
   579    content: "[-] ";
   580  }
   581  
   582  /* This is only needed for <p> because they are literally acting as paragraphs,
   583   * and thus having an ::before on the same line would force the paragraph to
   584   * move to the next line. This can be avoided by an inline-block display that
   585   * avoids that property while still having the other properties of the block
   586   * display. */
   587  .file-view.markup.orgmode li.unchecked > p,
   588  .file-view.markup.orgmode li.checked > p,
   589  .file-view.markup.orgmode li.indeterminate > p {
   590    display: inline-block;
   591  }