Hey there, Visitor!

To get the full benefits of the website you might want to be signed in.
Tags

+1
Score
1
Answers
2
Follows
أزاى أعمل ستاك fonts فى react native زى ما فى css

تقدر تعمل كدا فـCSS:

CSSfont-family: Arial, 'Comic Sans';

لكن فى react native بيطلب منك سترينج بدلًا من array و لما بكتبهم ورا بعض بيفشل، قصدى زى كدا:

JS{
  fontFamily: ['Arial', 'Comic Sans'],
}

فااا لو سمحتوا ازاى أقدر أعملها

IamFastre's avatar Fastre
-1
Score
3
Answers
1
Follows
This is not really a question it's more so a test

Code block test

SVELTE<script lang="ts">
  import Prism from "prismjs";
  import "prism-svelte";

  import { marked, Renderer, type Tokens } from "marked";

  interface Props {
    content: string;
  }

  const { content }: Props = $props();

  class FussrRenderer extends Renderer {
    code({ lang = "txt", text }: Tokens.Code): string {
      const content = Prism.highlight(text, Prism.languages[lang], lang);
      return `<pre><span class="lang">${lang}</span><code>${content}</code></pre>`;
    }
  }

  const renderer = new FussrRenderer({
    gfm:true,
    breaks:true,
  });
</script>

<div class="markdown">
  {@html marked(content, { renderer })}
</div>

<style lang="scss">
  @use "@/styles/utils.scss" as *;

  .markdown {
    font-size: 1em;
    line-height: 1.5rem;

    :global {
      img {
        max-width: 100%;
        max-height: 100%;
      }

      :not(pre) code {
        padding: 2.5px 5px;
        border-radius: 5px;
        background-color: C(secondary, 10%);
      }

      pre {
        @include flexbox();
        background-color: C(secondary, 10%);
        border-radius: 5px;
        padding: 5px;
        gap: 5px;

        span.lang {
          color: C(accent);
          font-family: FiraCode;
          font-size: smaller;
        }
      }
    }
  }
</style>

foo

#ffffff


end test

IamFastre's avatar Fastre
+1
Score
0
Answers
1
Follows
Best way to center a <div> vertically and horizontally?

What is the best way to center a <div> element on a page both vertically and horizontally?
I know that margin-left: auto; margin-right: auto; will center on the horizontal, but what is the best way to do it vertically, too?

IamFastre's avatar Fastre