Skip to content

Commit

Permalink
styles
Browse files Browse the repository at this point in the history
  • Loading branch information
brycebenton committed Apr 22, 2024
1 parent 8684aae commit 3bb863c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
5 changes: 3 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden; /* Ensures no scrolling on the entire document */
}

#display-container {
background: black;
width: 1920px;
height: 1080px;
width: 100%;
height: 100%;
overflow: hidden; /* Handles any overflow if the image is larger than the container */
cursor: none; /* Hides the cursor over the container */
}
Expand Down
33 changes: 33 additions & 0 deletions styles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# styles.css

The CSS file contains definitions for various elements, including the `body`, `html`, `#display-container`, and `#display-image` IDs, along with some transitions and animations for fade-in and fade-out effects. I will now check the Markdown file to see how these styles are referenced and if any updates are needed to match your current CSS setup. Let's take a look at your Markdown file.

The Markdown documentation provides a detailed explanation of the CSS updates made, focusing on improving the smoothness of image transitions with adjusted keyframes and timing functions. Based on the content of the CSS file, here are the updates and alignments that could be made to the Markdown file to ensure consistency and completeness:

1. **Additional Details on CSS Selectors**:
- The Markdown doesn't mention specific CSS selectors such as `#display-container` or `#display-image`. It would be beneficial to specify these IDs to clarify exactly where the described animations and transitions are applied.

2. **Transition and Animation Details**:
- The Markdown correctly describes the use of `ease-in-out` and opacity changes. However, it could explicitly connect these to the `fadeIn` and `fadeOut` keyframes and their respective CSS selectors for better clarity.

3. **CSS Properties Explained**:
- The document might also elaborate on the properties like `object-fit: cover;` and why it's important for maintaining the aspect ratio of images during transitions.

Here is an updated snippet of the Markdown document reflecting these suggestions:

```markdown
### Documentation for the Updated CSS

#### **Purpose of the Update**
The update to the CSS was designed to address an issue where the fading animation of an image appeared jerky or abrupt as new images started to display. The goal was to create a smoother visual transition during the fade-in and fade-out phases of the animation.

#### **Changes Made**

1. **Ease-in-out Timing Function**: The `ease-in-out` timing function was applied to the animation property of the image on the `#display-image` selector. This function starts the animation slowly, speeds up in the middle, and then slows down again towards the end. This gradual acceleration and deceleration help in smoothing out the transitions.

2. **Adjusted Keyframes**: The opacity keyframes for `fadeIn` and `fadeOut` were modified to prolong the period during which the image remains fully opaque. Previously, the image quickly became opaque and then transparent, contributing to a jerky transition. By adjusting the keyframes to `25%` and `75%` for full opacity, there is now a longer and smoother transition phase, reducing the perceived abruptness.

3. **CSS Selector Details**: Applied styles to `#display-container` to ensure the background and layout settings complement the smooth transitions of `#display-image`. The `object-fit: cover;` on the image ensures that its aspect ratio is maintained regardless of container size, important for visual consistency during transitions.

#### **Reason for Changes**
These changes were implemented to enhance the visual appeal and user experience of the website. Smooth animations are essential for maintaining a professional and polished appearance, especially in image-heavy displays. The adjustments ensure that viewers experience a seamless transition, which can keep them engaged without distraction caused by technical glitches like jerky animations.

0 comments on commit 3bb863c

Please sign in to comment.