nerdfisch: DevBits

Kleine, aber feine Code-Snippets, nützliche Tweaks und elegante Lösungsansätze aus dem Entwickler-Alltag

13.11.2025 | Henjo Völker

Jira JQL Filter: Issues with a date field value in the next upcoming month

filter_jira_issues_inside_upcoming_month.jql
AND "[yourDateField]" >= startOfMonth("+1") AND "[yourDateField]" <= endOfMonth("+1")
JQL
Jira
project management
issues
13.11.2025 | Holger Weischenberg

Check whether there is only one child item using CSS

.breadcrumb.scss
    .breadcrumb--item:only-child {
      svg {
        display: none;
      }
    }
    
breadcrumb
css
copy-paste
13.11.2025 | Holger Weischenberg

Simple SCSS compiler setup

package.json
{
  "name": "Foo project",
  "scripts": {
    "sass-dev": "sass --watch --update --style=expanded src/scss:dist/css",
    "sass-prod": "sass --no-source-map --style=compressed src/scss:dist/css"
  },
  "devDependencies": {
    "sass": "^1.86.0"
  }
}
json
scss
Frontend
frontend
npm
13.11.2025 | Holger Weischenberg

Consider the user's preference for dark or light system colors

variables.scss
/* Default theme */
:root {
  --Background-Color: #fff;
  --Text-Color: #000;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    --Background-Color: #000;
    --Text-Color: #fff;
  }
}
scss
themes
frontend
magic
13.11.2025 | Peter Gerken

Scroll offset respecting sticky elements (here: gin toolbar)

For fixed headers

base.css
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(70px + var(--gin-toolbar-secondary-height, 0px)) !important;
}
@media (min-width: 767px) {
  html {
    scroll-padding-top: calc(135px + var(--gin-toolbar-secondary-height, 0px)) !important;
  }
}

css