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

[Fixes #15766] Need Clearer Affix plugin documentation #15773

Merged
merged 1 commit into from
Feb 19, 2015

Conversation

kkirsche
Copy link
Contributor

@kkirsche kkirsche commented Feb 9, 2015

[Fixes #15766] Need Clearer Affix plugin documentation

@@ -10,7 +10,7 @@ <h2 id="affix-usage">Usage</h2>
<p>Use the affix plugin via data attributes or manually with your own JavaScript. <strong class="text-danger">In both situations, you must provide CSS for the positioning and width of your affixed content.</strong></p>

<h3>Positioning via CSS</h3>
<p>The affix plugin toggles between three classes, each representing a particular state: <code>.affix</code>, <code>.affix-top</code>, and <code>.affix-bottom</code>. You must provide the styles for these classes yourself (independent of this plugin) to handle the actual positions.</p>
<p>The affix plugin toggles between three classes, each representing a particular state: <code>.affix</code>, <code>.affix-top</code>, and <code>.affix-bottom</code>. You must provide the styles, with the exception of <code>position: fixed;</code> on <code>.affix</code>, for these classes yourself (independent of this plugin) to handle the actual positions. </p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing space

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Just waiting on sending the commit till we can work out some of the verbiage so that these commits don't get hidden.

@cvrebert cvrebert added the docs label Feb 9, 2015
@kkirsche
Copy link
Contributor Author

kkirsche commented Feb 9, 2015

What are your thoughts then about:

The affix plugin allows you to easily create a backwards-compatible relative positioned element until it crosses a specified threshold, at which point it is treated as fixed positioned.

Thoughts?

@cvrebert
Copy link
Collaborator

The "backwards-compatible" part seems like a non-sequitur.

@kkirsche
Copy link
Contributor Author

My logic behind that was that you had said that today the same thing can be accomplished with position: sticky;. My thought process was if this can be accomplished via CSS, the key reason to use a javascript solution would be backwards and cross-browser compatibility.

I can certainly make it "The affix plugin allows you to easily create a relative positioned element until it crosses a specified threshold, at which point it is treated as fixed positioned." though if you prefer

[Fixes twbs#15766] Need Clearer Affix plugin documentation

Remove trailing whitespace

Update the documentation
@kkirsche
Copy link
Contributor Author

Changed the verbiage and removed the trailing space. What do you think of it now @cvrebert?

@cvrebert cvrebert added this to the v3.3.4 milestone Feb 19, 2015
@cvrebert
Copy link
Collaborator

LGTM. Thanks.

cvrebert added a commit that referenced this pull request Feb 19, 2015
Fix #15766: Clarify Affix plugin docs
@cvrebert cvrebert merged commit 3748e44 into twbs:master Feb 19, 2015
@kkirsche kkirsche deleted the patch-16 branch February 19, 2015 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need Clearer Affix plugin documentation
2 participants