Accept both absolute and relative values for config padding (#308)

This commit is contained in:
Simon Lecoq
2021-05-17 22:19:12 +02:00
committed by GitHub
parent 09cf9cbdf2
commit d8b4279495
3 changed files with 22 additions and 13 deletions

View File

@@ -161,7 +161,9 @@ As it can depend on fonts and operating system, it is possible that final result
You can adjust padding by using `config_padding` option.
Specify a single value to apply it to both height and with, and two values to use the first one for width and the second for height. Both positive and negative values are accepted, but you must specify a percentage.
Specify a single value to apply it to both height and with, and two values to use the first one for width and the second for height. Both positive and negative values are accepted.
The allowed format is `(absolute padding) + (relative padding)%` (each operand is optional).
#### Examples workflows
@@ -169,7 +171,7 @@ Specify a single value to apply it to both height and with, and two values to us
- uses: lowlighter/metrics@latest
with:
# ... other options
config_padding: 6%, 15% # 6% width padding, 15% height padding
config_padding: 16, 32 + 8% # 16px width padding, 32px + 8% height padding
```
### 🧶 Using commits, pull requests, manual reviews or gists to handle metrics output

View File

@@ -180,7 +180,7 @@ inputs:
description: Image padding
type: array
format: comma-separated
default: 6%, 15%
default: 16, 32 + 8%
# Metrics output format
config_output: