PostCSS Border Align Allows you to create borders which do not affect the layout of the document. .example { border: inside 2px solid red;} Outputs: .example { box-shadow: inset 0 0 0 2px red;} Currently the plugin only works with solid borders, and will accept inside or outside. Setup npm install postcss-border-align --save-dev