Magento 2 How to override vendor/magento/magento2-base/lib/web/css/source/lib/_navigation.less?

You can try with

app/design/frontend/{Vendor}/{Theme}/web/css/source/lib/_navigation.less

Read more: How to override gallery.css


1) You have to copy _navigation.less from your parent theme to app\design\frontend\vendor\theme\web\css\source(your custom theme) and override your css after .lib-main-navigation(); and .lib-main-navigation-desktop(); this lib navigation style.

OR

2) you can override navigation variable's value in custom theme's _theme.less,

you can find variable name at lib\web\css\source\lib\variables

_navigation.less