Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(readme): update readme for custom srcset feat #60

Merged
merged 2 commits into from
Jun 2, 2020

Conversation

ericdeansanchez
Copy link
Contributor

This PR updates the readme for the custom srcsets feature set.

These changes not only reflect the additional features added, but
also try to pin down the semantics of our syntax and
documentation**.

Namely, the differentiation between fixed and fluid-width srcsets.
We currently construct two types of srcset attributes: those with fixed
widths and those with fluid widths.

Fluid-widths vary. A srcset attribute composed of target width pairs is
described as fluid because each image candidate string denotes a
unique width-described resource.

Fixed-widths are fixed. A srcset attribute composed of pixel density
descriptors (ie. 1x, 2x, 3x) is described as fixed-width because width
is held constant, while the pixel density descriptors vary.

Prior to this PR, only default fluid-width srcset attributes could be created.
Now, they can be created by supplying a list of widths to create_srcset.

Fluid-width sets can also be created by specifying a widths range
that begins and ends on specified value;. the tolerance can also be
specified resulting in more customizable fluid-width srcsets.

Prior to this PR, there was no way to customize the quality of fixed-width
sets. Now, variable quality is enabled by default and can be toggled off
by specifying either:

  • disableVariableQuality=True, or
  • by specifying a "q" parameter (i.e. q=75)

If"q" is supplied, it takes precedence over the default qualities and
disable_variable_quality and it is applied to each image candidate
string (URL) in the srcset attribute.

Lastly, ensure our examples stay current and correct they are
tested in the readme with the remaining tests defined in the
ReadMeTest.php.

README.md Outdated Show resolved Hide resolved
@ericdeansanchez ericdeansanchez merged commit 975cffa into master Jun 2, 2020
@ericdeansanchez ericdeansanchez deleted the update-readme branch June 2, 2020 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants