<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Andrej Sharapov</title>
    <description>The latest articles on Forem by Andrej Sharapov (@andrejsharapov).</description>
    <link>https://forem.com/andrejsharapov</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F565714%2F59b9a18d-494d-4ee7-9d3e-016d37346093.jpg</url>
      <title>Forem: Andrej Sharapov</title>
      <link>https://forem.com/andrejsharapov</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/andrejsharapov"/>
    <language>en</language>
    <item>
      <title>Awesome shadows for your project on vue.js along with Vue Box Shadows</title>
      <dc:creator>Andrej Sharapov</dc:creator>
      <pubDate>Wed, 28 Sep 2022 06:31:58 +0000</pubDate>
      <link>https://forem.com/andrejsharapov/awesome-shadows-for-your-project-on-vuejs-along-with-vue-box-shadows-2mln</link>
      <guid>https://forem.com/andrejsharapov/awesome-shadows-for-your-project-on-vuejs-along-with-vue-box-shadows-2mln</guid>
      <description>&lt;p&gt;Vue Box Shadows is small library that will help make your Vue project better and make it easier to work with shadows. It contains &lt;strong&gt;more than 100&lt;/strong&gt; simple and soft options.&lt;/p&gt;

&lt;p&gt;Excellent compatibility with Vuetify, TailwindCSS, Bootstrap and other UI frameworks.&lt;/p&gt;

&lt;p&gt;It is very simple and easy to use, but the result will pleasantly surprise you! 😋&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codesandbox.io/s/vue-box-shadows-nuxt2-and-tailwindcss-db9968?file=/components/Tutorial.vue"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DWps4bJD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ccmsjjk6ecn1eqj8k0rc.png" alt="Image description" width="880" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is easy to design a blog, article, product cards and pricing tables.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cay1w-cK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n92fq5lpzvaux72yhgjd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cay1w-cK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n92fq5lpzvaux72yhgjd.png" alt="Image description" width="783" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G9mpY5QW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bd489vszhziu7pmhzef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G9mpY5QW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bd489vszhziu7pmhzef.png" alt="Image description" width="776" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And for fans of neumorphism, there is also a nice bonus.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codesandbox.io/s/v-b-s-1-0-4-neumorphism-0pnb12"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CrKqfzT2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fki948sh4t7aq6q12kfz.png" alt="Image description" width="749" height="724"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Look at more examples in &lt;a href="https://codesandbox.io/search?query=&amp;amp;page=1&amp;amp;configure%5BhitsPerPage%5D=12&amp;amp;refinementList%5Bnpm_dependencies.dependency%5D%5B0%5D=vue-box-shadows"&gt;codesandbox&lt;/a&gt; or directly in the &lt;a href="https://github.com/andrejsharapov/vue-box-shadows"&gt;repository&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>vue-box-shadows</title>
      <dc:creator>Andrej Sharapov</dc:creator>
      <pubDate>Fri, 22 Jul 2022 05:16:54 +0000</pubDate>
      <link>https://forem.com/andrejsharapov/vue-box-shadows-45fb</link>
      <guid>https://forem.com/andrejsharapov/vue-box-shadows-45fb</guid>
      <description>&lt;p&gt;Vue.js wrapper for &lt;a href="https://madeas.github.io/box-shadows/"&gt;Box-shadow.css&lt;/a&gt; to build simple and awesome shadows with use vue.&lt;/p&gt;

&lt;p&gt;This is a small package that adds interesting shadows to Vue.js projects. With it, you can create interesting and airy components without having to spend time learning how the CSS property you are using works. You just need to connect the package and choose the shadow number you like from the collection.&lt;/p&gt;

&lt;p&gt;Package tested with Vue CLI and Nuxt.js. You can see examples in the &lt;a href="https://github.com/andrejsharapov/vue-box-shadows"&gt;repository&lt;/a&gt;. I will also welcome your wishes, which you can share in the repository &lt;a href="https://github.com/andrejsharapov/vue-box-shadows/discussions"&gt;discussions&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'm a bit nervous and I hope you rate the repository and find it useful to you.&lt;/p&gt;

</description>
      <category>vue</category>
      <category>css</category>
      <category>programming</category>
      <category>github</category>
    </item>
    <item>
      <title>Vuetify use CSS Grid classes</title>
      <dc:creator>Andrej Sharapov</dc:creator>
      <pubDate>Tue, 08 Mar 2022 01:14:21 +0000</pubDate>
      <link>https://forem.com/andrejsharapov/vuetify-use-css-grid-classes-17nl</link>
      <guid>https://forem.com/andrejsharapov/vuetify-use-css-grid-classes-17nl</guid>
      <description>&lt;p&gt;Unfortunately &lt;a href="https://vuetifyjs.com/en/getting-started/installation/" rel="noopener noreferrer"&gt;Vuetify.js&lt;/a&gt; still doesn’t use css grid, and from what I’ve found online on the topic, there’s only this &lt;a href="https://github.com/vuetifyjs/vuetify/issues/6117" rel="noopener noreferrer"&gt;issue&lt;/a&gt;, which was closed for inactivity.&lt;/p&gt;

&lt;p&gt;I want to offer this styles to anyone who wants to work with vuetify.js and grid CSS together. It may seem complicated and confusing, but if you follow the instructions, you will succeed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Add CSS Grid classes
&lt;/h2&gt;

&lt;p&gt;You can add the styles file to the folder from which they will be used. I am using nuxt so my file location is &lt;em&gt;~/assets/sass/extends/css-grid.sass&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/**
 *
 * Display Grid
 *
 */

.d-grid
  display: grid

.d-inline-grid
  display: inline-grid

/**
 *
 * Grid Template Columns
 *
 */

.grid-cols-0
  grid-template-columns: none

@for $gtc from 1 through 12
  .grid-cols-#{$gtc}
    grid-template-columns: repeat(#{$gtc}, minmax(0, 1fr))

/**
 *
 * Grid Column
 *
 */

.col-auto
  grid-column: auto

@for $gc from 1 through 12
  .col-span-#{$gc}
    grid-column: span #{$gc} / span #{$gc}

/**
 *
 * Grid Column Start
 *
 */

.col-start-auto
  grid-column-start: auto

@for $gcs from 1 through 13
  .col-start-#{$gcs}
    grid-column-start: #{$gcs}

/**
 *
 * Grid Column End
 *
 */

.col-end-auto
  grid-column-end: auto

@for $gce from 1 through 13
  .col-end-#{$gce}
    grid-column-end: #{$gce}

/**
 *
 * Grid Template Rows
 *
 */

.grid-rows-0
  grid-template-rows: none

@for $gtr from 1 through 6
  .grid-rows-#{$gtr}
    grid-template-rows: repeat(#{$gtr}, minmax(0, 1fr))

/**
 *
 * Grid Row Span
 *
 */

.row-auto
  grid-row: auto

@for $gr from 1 through 6
  .row-span-#{$gr}
    grid-row: span #{$gr} / span #{$gr}

/**
 *
 * Grid Row Start
 *
 */

.row-start-auto
  grid-row-start: auto

@for $grs from 1 through 7
  .row-start-#{$grs}
    grid-row-start: #{$grs}

/**
 *
 * Grid Row End
 *
 */

.row-end-auto
  grid-row-end: auto

@for $gre from 1 through 7
  .row-end-#{$gre}
    grid-row-end: #{$gre}

/**
 *
 * Grid Auto Columns
 *
 */

.auto-cols-auto
  grid-auto-columns: auto

.auto-cols-min
  grid-auto-columns: min-content

.auto-cols-max
  grid-auto-columns: max-content

.auto-cols-fr
  grid-auto-columns: minmax(0, 1fr)

/**
 *
 * Grid Auto Rows
 *
 */

.auto-rows-auto
  grid-auto-rows: auto

.auto-rows-min
  grid-auto-rows: min-content

.auto-rows-max
  grid-auto-rows: max-content

.auto-rows-fr
  grid-auto-rows: minmax(0, 1fr)

/**
 *
 * Grid Auto Flow
 *
 */

.grid-flow-col
  grid-auto-flow: column

.grid-flow-col-dense
  grid-auto-flow: column dense

.grid-flow-row
  grid-auto-flow: row

.grid-flow-row-dense
  grid-auto-flow: row dense

/**
 *
 * Grid Gap
 *
 */

.gap-0
  gap: 0px

.gap-x-0
  column-gap: 0px

.gap-y-0
  row-gap: 0px

$gap: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96

@each $g in $gap
  .gap-#{$g}
    gap: calc(#{$g} * 0.25rem)

@each $cg in $gap
  .gap-x-#{$cg}
    column-gap: calc(#{$cg} * 0.25rem)

@each $rg in $gap
  .gap-y-#{$rg}
    row-gap: calc(#{$rg} * 0.25rem)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Variables
&lt;/h2&gt;

&lt;p&gt;If you want media queries to work for you the same way they do for other classes like &lt;code&gt;-md- or -lg-&lt;/code&gt;, then the first thing you need to do is defined breakpoints in your variables file. For Vue CLI this &lt;em&gt;~/sass/variables.scss&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// details https://vuetifyjs.com/en/features/breakpoints/#thresholds

$grid-breakpoints: (
  'xs': 0,
  'sm': 600px,
  'md': 960px,
  'lg': 1264px,
  'xl': 1904px,
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Media queries
&lt;/h2&gt;

&lt;p&gt;Next, you need to add the mixin to the very top of the vuetify-css-grid.sass file you’ve already created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/*=====  Start of Grid CSS  ======*/

@mixin mq($breakpoint)
  @if map-has-key($grid-breakpoints, $breakpoint)
    @media (min-width: #{map-get($grid-breakpoints, $breakpoint)})
      @if $breakpoint != xs

        .d-#{$breakpoint}-grid
          display: grid !important

        .d-#{$breakpoint}-inline-grid
          display: inline-grid !important

        @for $gtc from 1 through 12
          .grid-cols-#{$breakpoint}-#{$gtc}
            grid-template-columns: repeat(#{$gtc}, minmax(0, 1fr))

        @for $gc from 1 through 12
          .col-span-#{$breakpoint}-#{$gc}
            grid-column: span #{$gc} / span #{$gc}

        @for $gcs from 1 through 13
          .col-start-#{$breakpoint}-#{$gcs}
            grid-column-start: #{$gcs}

        @for $gce from 1 through 13
          .col-end-#{$breakpoint}-#{$gce}
            grid-column-end: #{$gce}

        @for $gtr from 1 through 6
          .grid-rows-#{$breakpoint}-#{$gtr}
            grid-template-rows: repeat(#{$gtr}, minmax(0, 1fr))

        @for $gr from 1 through 6
          .row-span-#{$breakpoint}-#{$gr}
            grid-row: span #{$gr} / span #{$gr}

        @for $grs from 1 through 7
          .row-start-#{$breakpoint}-#{$grs}
            grid-row-start: #{$grs}

        @for $gre from 1 through 7
          .row-end-#{$breakpoint}-#{$gre}
            grid-row-end: #{$gre}

        @each $g in $gap
          .gap-#{$breakpoint}-#{$g}
            gap: calc(#{$g} * 0.25rem)

        @each $cg in $gap
          .gap-x-#{$breakpoint}-#{$cg}
            column-gap: calc(#{$cg} * 0.25rem)

        @each $rg in $gap
          .gap-y-#{$breakpoint}-#{$rg}
            row-gap: calc(#{$rg} * 0.25rem)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tests
&lt;/h2&gt;

&lt;p&gt;To make sure queries work as expected, try adding this mixin to your application’s main class. Since I’m using nuxt, I’ve added requests to the &lt;code&gt;v-main&lt;/code&gt; of my app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@mixin bg($breakpoint)
  @if map-has-key($grid-breakpoints, $breakpoint)
    @media (min-width: #{map-get($grid-breakpoints, $breakpoint)})
      @content

.v-main
  @include bg(xs)
    background: #fc5f5f !important
  @include bg(sm)
    background: #fcf05f !important
  @include bg(md)
    background: #90e89f !important
  @include bg(lg)
    background: #909be8 !important
  @include bg(xl)
    background: #ce90e8 !important
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: What to use
&lt;/h2&gt;

&lt;p&gt;Then, at the very bottom, add the breakpoints you will use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@include mq(sm)
@include mq(md)
@include mq(lg)
// @include mq(xl)

/*=====  End of Grid CSS  ======*/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To disable unnecessary queries, comment out excess lines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nuxt
&lt;/h2&gt;

&lt;p&gt;If you’re using nuxt like I am, you can add styles to the nuxt.config file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default {
  css: [
    { src: '~/assets/sass/extends/vuetify-css-grid', lang: 'sass' },
  ],
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;It really works. To verify this, you can look at the &lt;a href="https://github.com/andrejsharapov/nuxt-app/blob/66756b44f30d76dd6f6d30e2ecffa1fb49ab45ab/pages/index.vue#L14" rel="noopener noreferrer"&gt;code on github&lt;/a&gt; or look across the console on &lt;a href="https://sharapov.dev/en/" rel="noopener noreferrer"&gt;the site&lt;/a&gt; (index page, screen #1).&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vw5aq3z8g90ah54qf1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vw5aq3z8g90ah54qf1l.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vuetify</category>
      <category>vue</category>
      <category>sass</category>
      <category>nuxt</category>
    </item>
  </channel>
</rss>
